From e08d287ef834aee8d7d684c9156720dee9fa5f74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sen=C3=A9n=20Rodero=20Rodr=C3=ADguez?= <15726+Senen@users.noreply.github.com> Date: Tue, 20 Dec 2022 16:26:48 +0100 Subject: [PATCH] Do not track `Apartment::TenantNotFound` exceptions through `Airbrake` As we do with `ActiveRecord::NotFound` exceptions. Otherwise, we can quickly flood the third-party application in charge of tracking exceptions. --- config/initializers/errbit.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/initializers/errbit.rb b/config/initializers/errbit.rb index 266a5a103..0f8870c8e 100644 --- a/config/initializers/errbit.rb +++ b/config/initializers/errbit.rb @@ -16,7 +16,7 @@ Airbrake.configure do |config| end Airbrake.add_filter do |notice| - ignorables = %w[ActiveRecord::RecordNotFound] + ignorables = %w[ActiveRecord::RecordNotFound Apartment::TenantNotFound] notice.ignore! if ignorables.include? notice[:errors].first[:type] end