[python-pytrakt] Feature: Throw BadResponseException on JSON decode errors#181
Open
glensc wants to merge 4 commits intomoogar0880:masterfrom
Open
[python-pytrakt] Feature: Throw BadResponseException on JSON decode errors#181glensc wants to merge 4 commits intomoogar0880:masterfrom
glensc wants to merge 4 commits intomoogar0880:masterfrom
Conversation
glensc
commented
Jan 15, 2022
trakt/core.py
Outdated
Contributor
Author
There was a problem hiding this comment.
Maybe should add a specific JsonDecodeException here?
glensc
commented
Jan 15, 2022
trakt/errors.py
Outdated
Contributor
Author
There was a problem hiding this comment.
used negative code for internal errors sp the positive numbers could be mapped to HTTP status codes
glensc
commented
Jan 15, 2022
trakt/core.py
Outdated
Contributor
Author
There was a problem hiding this comment.
or better add as constructor argument?
Contributor
Author
Contributor
Author
|
Another fresh error: The specific exception would allow to figure out url and status code ( |
a4106cd to
0e92938
Compare
Contributor
Author
|
yet another json decode error #194 |
2 tasks
0e92938 to
27d90b1
Compare
|
This would be great to have, please merge, thank you! |
2 tasks
glensc
added a commit
to glensc/python-pytrakt
that referenced
this pull request
Oct 19, 2022
Contributor
Author
|
Carried: |
This was referenced Oct 23, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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