ShokoAnime / Shokofin

Repository for Shokofin, a plugin that brings Shoko to Jellyfin.
https://shokoanime.com
MIT License
148 stars 18 forks source link

Adds targeted error handling for invalid shoko user tokens #39

Closed fearnlj01 closed 1 year ago

fearnlj01 commented 1 year ago

I'm sure there are much better ways of doing this, but this should be functional for the time being.

In the UserDataSyncManager class, wherever the user data specific token is used for an API call, if there is an invalid token it should be caught as an error and logged, also including the jellyfin username of the user config with the offending invalid token.

Could avoid using the UserManager interface if we just dump the guid of the user instead, but I figured that it's a lot easier for most if they can just read a username in the logs instead!

This has been tested with valid & invalid tokens and "Works on my machine™".