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

Status change depending of rescue_from #533

Closed
vptcnt opened this issue Dec 12, 2013 · 1 comment
Closed

Status change depending of rescue_from #533

vptcnt opened this issue Dec 12, 2013 · 1 comment

Comments

@vptcnt
Copy link

vptcnt commented Dec 12, 2013

Hi

For parameters validations, the status code is not the same depending of the usage of rescue_from :all

without rescue_from :all, if a parameter is not valid, we have the 400 Bad Request

with rescue_from :all, we have a 403 Forbidden

Why the status code is changing ?

Regards

@dblock
Copy link
Member

dblock commented Dec 12, 2013

This should have been a 500, since it's a result of an exception, which has been fixed in HEAD, #525.

For validations a 400 makes sense, because it's a bad parameter, aka a bad request.

@dblock dblock closed this as completed Dec 12, 2013
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

2 participants