lib/raven/rack.rb in sentry-raven-0.4.0 vs lib/raven/rack.rb in sentry-raven-0.4.1

- old
+ new

@@ -31,11 +31,13 @@ evt = Event.capture_rack_exception(e, env) Raven.send(evt) raise end - if env['rack.exception'] - evt = Event.capture_rack_exception(env['rack.exception'], env) + error = env['rack.exception'] || env['sinatra.error'] + + if error + evt = Event.capture_rack_exception(error, env) Raven.send(evt) if evt end response end