sinatra/sinatra — Issue #422: Catching exceptions from middleware
Author: Zapotek
Created: 2011-12-05 19:43:12+00:00
State: open

Hi,

Is there a way to catch exceptions from Rack middleware using:

```
error klass do
end
````

I'm trying to manage ```::Rack::Csrf::InvalidCsrfToken``` exceptions but I can't find a way that doesn't include monkey-patching.

Cheers,
Tasos L.