The new
exception_notification
Show archive.org snapshot
has awesome options like :ignore_crawlers => true
and :ignore_if => lambda { ... }
. These options should be helpful in ensuring every notifications means something actionable (instead of a long log of failures that just scrolls by).
Note that you should not ignore crawlers by default. Ideally, cool URLs never change and always respond with a helpful redirect or similar.
Ignore Errors like this:
# config/initializers/exception_notification.rb
ExceptionNotification.configure do |config|
# ...
config.ignored_exceptions += %w[OneException AnotherError]
end
In older versions of exception_notifications, you would use config.ignored_errors
instead.
Compatibility & config changes
Unfortunately it's Ruby 1.9.3 only and you need to make a small config change in application.rb
:
config.middleware.use ExceptionNotification::Rack, # not the new middleware class
:email => { .... old options here ... }
After deploying the change, make sure notifications are still sent (internal card).
Posted by Henning Koch to makandra dev (2013-07-30 08:16)