Skip to content
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

Bugfix: JSONDecodeError handling for simplejson #354

Merged
merged 3 commits into from
Jul 4, 2022

Conversation

Stealthii
Copy link
Contributor

This PR fixes JSONDecodeError exception handling when the simplejson package is available within the environment.


requests has a compat module that will use simplejson if it is available within the environment. We should catch the exception outlined in this module as it will reflect the json decoder used by requests.

Note that requests.exceptions.JSONDecodeError (and subsequently requests.JSONDecodeError) is not the same thing, and will not represent the same exception in this case due to the class initialization.

requests has a compat module that will use simplejson if it is available
within the environment. We should catch the exception outlined in this
module as it will reflect the json decoder used by requests.

Note that requests.exceptions.JSONDecodeError, and subsequently
requests.JSONDecodeError is not the same thing, and will not represent
the same exception in this case.
@beliaev-maksim
Copy link
Member

looks good

@allburov allburov merged commit 1ef991a into devopshq:master Jul 4, 2022
@allburov
Copy link
Member

allburov commented Jul 4, 2022

@Stealthii thank you for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants