Ignore RecordNotFound exceptions in Errbit

This commit is contained in:
Julian Herrero
2019-08-23 17:48:21 +07:00
committed by Javi Martín
parent 4ac36b91e2
commit 83fb7a769c

View File

@@ -8,6 +8,11 @@ Airbrake.configure do |config|
config.ignore_environments += [Rails.env] if Rails.application.secrets.errbit_project_id.blank?
end
Airbrake.add_filter do |notice|
ignorables = %w[ActiveRecord::RecordNotFound]
notice.ignore! if ignorables.include? notice[:errors].first[:type]
end
if Rails.application.secrets.errbit_self_hosted_ssl.present?
# Patch from: https://mensfeld.pl/2016/05/setting-up-errbit-reporter-airbrake-v5-gem-to-work-with-self-signed-https-certificate/
module Patches