-
Notifications
You must be signed in to change notification settings - Fork 48
[python-pytrakt] Feature: Throw BadResponseException on JSON decode errors #181
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
trakt/core.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe should add a specific JsonDecodeException here?
trakt/errors.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used negative code for internal errors sp the positive numbers could be mapped to HTTP status codes
trakt/core.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or better add as constructor argument?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Another fresh error: The specific exception would allow to figure out url and status code ( |
a4106cd to
0e92938
Compare
|
yet another json decode error #194 |
0e92938 to
27d90b1
Compare
|
This would be great to have, please merge, thank you! |
|
Carried: |
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:Add fallback logic to be able to catch this specific error from applications.
Fixes #146