lib/egregious.rb in egregious-0.2.12 vs lib/egregious.rb in egregious-0.2.13

- old
+ new

@@ -204,15 +204,17 @@ notify_airbrake(exception) end # override this if you want to control what gets sent to airbrake def notify_airbrake(exception) - # tested with airbrake 3.1.15, 4.2.1 and 5.0.5 + # tested with airbrake 4.3.5 and 5.0.5 if defined?(Airbrake) if(Airbrake.respond_to?(:notify_or_ignore)) - env['airbrake.error_id'] = Airbrake.notify_or_ignore(exception) # V4 + env['airbrake.error_id'] = Airbrake.notify_or_ignore(exception, airbrake_request_data) # V4 else - env['airbrake.error_id'] = Airbrake.notify(exception) # V5 + # V5 + notice = Airbrake::Rack::NoticeBuilder.new(env).build_notice(exception) + env['airbrake.error_id'] = Airbrake.notify(notice) end end end # override this if you want to change your respond_to behavior