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:
@@ -16,7 +16,7 @@ Airbrake.configure do |config|
|
|||||||
end
|
end
|
||||||
|
|
||||||
Airbrake.add_filter do |notice|
|
Airbrake.add_filter do |notice|
|
||||||
ignorables = %w[ActiveRecord::RecordNotFound]
|
ignorables = %w[ActiveRecord::RecordNotFound Apartment::TenantNotFound]
|
||||||
notice.ignore! if ignorables.include? notice[:errors].first[:type]
|
notice.ignore! if ignorables.include? notice[:errors].first[:type]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user