Forum: Ruby on Rails How to handle exception that is generated in rack middleware before it reach rails app?

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
7785c385452261a1acf7b55166b58a62?d=identicon&s=25 drchanimal (Guest)
on 2013-07-23 09:34
(Received via mailing list)
I know that we can use config.exception_app to set up custom exception
handling and also use rescue_from. However, I have an issue that there
is
malformed request (testing generated request) that caused Rails Rack
middleware to throw an exception when Rack's parse_query method.  Here
is
the detail of the
problem:
http://stackoverflow.com/questions/17796878/how-to...

The issue is that it failed in rails Rack::MethodOverride with is
before ActionDispatch::ShowExceptions middleware and way before it even
got
to the rails app.

So how do we handle the exception gracefully without showing the stack
trace?

Thanks for your help.
This topic is locked and can not be replied to.