Skip to content

Rails log shows Internal Server Error when handling HTTPStatus exceptions #4

@haxney

Description

@haxney

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:

Started GET "/bla?arg=invalid" for 127.0.0.1 at 2011-08-11 20:14:21 -0400
  Processing by BlasController#index as HTML
  Parameters: {"arg"=>"invalid"}
Completed 500 Internal Server Error in 1ms
Rendered exceptions/bad_request.html.erb within layouts/application (4.0ms)

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions