Airbrake notify_airbrake method not working in the controller

In the airbrake controller, this code works (gives a notification) save => ex Airbrake.notify but

rescue => ex
    notify_airbrake(ex)
end

It does not give any notice of air brake. notify_airbrake (ex) to work

+3
source share
2 answers

You are probably testing this in your development environment. Add this to yours airbrake.rband it should work.

config.development_environments = []

+3
source

The implementation notify_airbrakeignores the local request. Therefore, if you try to use this method in development, you are out of luck. No matter what you define in your Airbrake configuration.

So, you can install consider_all_requests_local = falsethat does not meet your requirements.

airbrake_request_data, , .

rescue => ex
  Airbrake.notify(ex, airbrake_request_data)
  redirect_to root_url
end

, !

+1

All Articles