PyTrakt
PyTrakt copied to clipboard
[python-pytrakt] Feature: Throw BadResponseException on JSON decode errors
Many JSONDecodeError (from json module) are actually thrown because trakt.tv site responds with a status code that is not yet recognized by this library:
- https://github.com/Taxel/PlexTraktSync/issues?q=label%3A%22trakt+support%22+sort%3Aupdated-desc+is%3Aclosed+JSONDecodeError
Add fallback logic to be able to catch this specific error from applications.
Fixes https://github.com/moogar0880/PyTrakt/issues/146
Another fresh error:
- https://github.com/Taxel/PlexTraktSync/issues/431#issuecomment-1013684670
The specific exception would allow to figure out url and status code (.response property).
yet another json decode error https://github.com/moogar0880/PyTrakt/pull/194
This would be great to have, please merge, thank you!
Carried:
- https://github.com/glensc/python-trakt/commit/827550a0edab5988a713bfe609bb21bd7d504219