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

Add test on receiving an invalid JSON in the APIError exception handler. #1512

Merged
merged 1 commit into from
Sep 22, 2024

Conversation

lavigne958
Copy link
Collaborator

Manually build an invalid JSON body. Using HTML to fake using the wrong endpoint that returns HTML instead of JSON.

Use that new http client to do some request and make sure the error matches.

@lavigne958 lavigne958 self-assigned this Sep 22, 2024
Manually build an invalid JSON body. Using HTML to fake using the wrong
endpoint that returns HTML instead of JSON.

Use that new http client to do some request and make sure the error
matches.

Signed-off-by: Alexandre Lavigne <[email protected]>
@alifeee
Copy link
Collaborator

alifeee commented Sep 22, 2024

looks splendid ! :)

@lavigne958 lavigne958 merged commit 014f25b into master Sep 22, 2024
10 checks passed
@lavigne958 lavigne958 deleted the test/handle_api_error_not_json branch September 22, 2024 22:27
@alifeee alifeee mentioned this pull request Sep 24, 2024
@alifeee alifeee mentioned this pull request Oct 3, 2024
@alifeee
Copy link
Collaborator

alifeee commented Oct 3, 2024

hi all

a new release 6.1.3 has been released (on github) (on PyPi) which contains a fix for this issue

we now catch the non-JSON error and turn it into a GSpreadException which should be easier to catch and find out what went wrong with the request

see more context here: #1510

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

Successfully merging this pull request may close these issues.

2 participants