Skip to content
Snippets Groups Projects
Unverified Commit 4da1c89e authored by Sébastien Gaya's avatar Sébastien Gaya Committed by GitHub
Browse files

patch bugsnag for activestorage issues on analyze (#1760)

parent 2a10b6bd
No related branches found
No related tags found
No related merge requests found
......@@ -3,4 +3,19 @@ Bugsnag.configure do |config|
config.release_stage = ENV['APPLICATION_ENV']
config.notify_release_stages = ['production', 'staging']
config.meta_data_filters += ['access_token', 'sso_cert']
config.add_on_error(proc do |event|
next unless event.metadata.key?(:active_job)
job_name = event.metadata.dig(:active_job, :job_name)
next unless job_name == "ActiveStorage::AnalyzeJob"
ignored_error_classes = [
"ActiveStorage::FileNotFoundError",
"Aws::S3::Errors::NoSuchKey",
"Aws::S3::Errors::NotFound",
"MiniMagick::Error"
]
error_class = event.exceptions.first[:errorClass]
next unless ignored_error_classes.include?(error_class)
false
end)
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment