-
Notifications
You must be signed in to change notification settings - Fork 274
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
Invalid body causes a 500 #1507
Labels
Comments
No objection! 👍 |
The issue is also present in Dancer v1 |
veryrusty
added a commit
that referenced
this issue
Jul 5, 2019
There's a grey area here between throwing a 400 Bad Request, and 500 Internal Error. As re-sending a failed request at this point is always going to fail, send this as a 400 response; so the client doesn't try again. This is a change in behaviour in core; we always sent this as a 500 error before. However issues #1496, #1507 and #1056 point to a 400 error being the better option.
Reference tests for this: #1508 |
cromedome
pushed a commit
that referenced
this issue
Apr 11, 2020
There's a grey area here between throwing a 400 Bad Request, and 500 Internal Error. As re-sending a failed request at this point is always going to fail, send this as a 400 response; so the client doesn't try again. This is a change in behaviour in core; we always sent this as a 500 error before. However issues #1496, #1507 and #1056 point to a 400 error being the better option.
Resolved by #1509. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When making a call with an invalid body,
HTTP::Body
croaks, which triggers a 400.I think we should instead return a 400 for an invalid request.
Objections?
The text was updated successfully, but these errors were encountered: