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.
This commit is contained in:
Senén Rodero Rodríguez
2022-12-20 16:26:48 +01:00
parent d63efc7815
commit e08d287ef8

View File

@@ -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