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

Delete with 204 response (and empty body) causes JSON parse error #55

Open
tim-hitchins-ekkosense opened this issue Feb 16, 2022 · 0 comments

Comments

@tim-hitchins-ekkosense
Copy link

tim-hitchins-ekkosense commented Feb 16, 2022

the JSON:API spec allows for delete requests to have a status code 204, and have no content in the body. This causes an error in this library because it tries to JSON parse the response before checking the status code.

The issue is in src/jsonapi_client/session.py, line 538.

tim-hitchins-ekkosense added a commit to tim-hitchins-ekkosense/jsonapi-client that referenced this issue Feb 16, 2022
tim-hitchins-ekkosense added a commit to tim-hitchins-ekkosense/jsonapi-client that referenced this issue Feb 16, 2022
…lete-204-parse-error

Fix qvantel#55 add check around content prior to JSON parse
@tim-hitchins-ekkosense tim-hitchins-ekkosense changed the title Delete providing 204 causes JSON parse error Delete with 204 response (and empty body) causes JSON parse error Feb 18, 2022
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

No branches or pull requests

1 participant