lib/raven/rack.rb in sentry-raven-0.4.1 vs lib/raven/rack.rb in sentry-raven-0.4.2
- old
+ new
@@ -29,9 +29,11 @@
raise # Don't capture Raven errors
rescue Exception => e
evt = Event.capture_rack_exception(e, env)
Raven.send(evt)
raise
+ ensure
+ Raven.context.clear!
end
error = env['rack.exception'] || env['sinatra.error']
if error