Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Fix 500 on invalid utf-8 in request #2663

Merged
merged 2 commits into from
Nov 13, 2017
Merged

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Nov 10, 2017

If somebody sends us a request where the the body is invalid utf-8, we should
return a 400 rather than a 500. (json.loads throws a UnicodeError in this
situation)

We might as well catch all Exceptions here: it seems very unlikely that we
would get a request that *isn't caused by invalid json.

If somebody sends us a request where the the body is invalid utf-8, we should
return a 400 rather than a 500. (json.loads throws a UnicodeError in this
situation)

We might as well catch all Exceptions here: it seems very unlikely that we
would get a request that *isn't caused by invalid json.
@richvdh
Copy link
Member Author

richvdh commented Nov 13, 2017

retest this please

@richvdh richvdh merged commit 781c15a into develop Nov 13, 2017
@richvdh richvdh deleted the rav/invalid_request_utf8 branch November 29, 2017 16:03
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants