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

Fix responses with 204 status codes #108

Merged
merged 2 commits into from
Dec 9, 2020
Merged

Fix responses with 204 status codes #108

merged 2 commits into from
Dec 9, 2020

Conversation

eengoron
Copy link
Contributor

@eengoron eengoron commented Dec 9, 2020

This PR fixes an issue where, if we received a 204 response from Close, we'd try to return response.json() and we'd receive a JSONDecodeError:

 json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

because 204 responses have no content to decode.

This change makes it so that if we hit a 204, we just return an empty string.

@eengoron eengoron merged commit b5c7dca into master Dec 9, 2020
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