-
Notifications
You must be signed in to change notification settings - Fork 9
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
Rails log shows Internal Server Error when handling HTTPStatus exceptions #4
Comments
This sounds like a bug I fixed in Rails (rails/rails#2133). Are you raising that exception inside of a rescue_from block? |
I'm using Rails 3.0.9; was your fix included in that? I'm raising the exceptions from the controller, not anything fancy :) |
This patch seems to be in the master branch, so it hasn't been released yet and will be part of Rails 3.1. |
Got it. I'll try this out when I get a chance. |
It should also be in the next release of the 3.0.x branch, so 3.0.10. |
Any update on this issue? |
@jstorimer's patch was included in the Rails 3.0.10 release. Can you check if it works for you after upgrading? It should be working for 3.1 as well. |
I am throwing an
HTTPStatus::BadRequest
exception in my controller when a request is invalid. The server correctly replies with a 400 status code and whatever template I give it, but the log in the server console shows:So everything is returned correctly, but an incorrect value shows up in the log. It isn't the biggest problem, since as far as the client is concerned, everything is normal. But the log messages aren't very useful, since there's no differentiation between the different kinds of exceptions raised.
Thanks for an awesome yet simple gem!
The text was updated successfully, but these errors were encountered: