Skip to content

Re-raise the exception when failing to parse JSON#1892

Merged
s-t-e-v-e-n-k merged 1 commit intoPyGithub:masterfrom
s-t-e-v-e-n-k:re-raise-json-parse-failure
Mar 24, 2021
Merged

Re-raise the exception when failing to parse JSON#1892
s-t-e-v-e-n-k merged 1 commit intoPyGithub:masterfrom
s-t-e-v-e-n-k:re-raise-json-parse-failure

Conversation

@s-t-e-v-e-n-k
Copy link
Copy Markdown
Collaborator

Since GitHub has the bad manners to return bare strings for some API
endpoints, one sharp edge has been that JSON decoding errors were masked
since we wrap the string in a dictionary. However, this makes it
difficult to debug malformed JSON in replay data, so re-raise the
exception if the first character is a { or [ (IE, it's an object or
list.)

Since GitHub has the bad manners to return bare strings for some API
endpoints, one sharp edge has been that JSON decoding errors were masked
since we wrap the string in a dictionary. However, this makes it
difficult to debug malformed JSON in replay data, so re-raise the
exception if the first character is a { or [ (IE, it's an object or
list.)
@s-t-e-v-e-n-k s-t-e-v-e-n-k force-pushed the re-raise-json-parse-failure branch from ee25612 to 1432e41 Compare March 24, 2021 01:51
@s-t-e-v-e-n-k s-t-e-v-e-n-k merged commit 916da53 into PyGithub:master Mar 24, 2021
@s-t-e-v-e-n-k s-t-e-v-e-n-k deleted the re-raise-json-parse-failure branch October 21, 2021 03:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant