lib/sentry/rails/railtie.rb in sentry-rails-5.7.0 vs lib/sentry/rails/railtie.rb in sentry-rails-5.8.0
- old
+ new
@@ -54,10 +54,12 @@
next unless Sentry.initialized?
Sentry.configuration.background_worker_threads = 0
at_exit do
# TODO: Add a condition for Rails 7.1 to avoid confliction with https://github.com/rails/rails/pull/44999
- Sentry::Rails.capture_exception($ERROR_INFO, tags: { source: "runner" }) if $ERROR_INFO
+ if $ERROR_INFO && !($ERROR_INFO.is_a?(SystemExit) && $ERROR_INFO.success?)
+ Sentry::Rails.capture_exception($ERROR_INFO, tags: { source: "runner" })
+ end
end
end
def configure_project_root
Sentry.configuration.project_root = ::Rails.root.to_s