We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 698641e commit 75b5ac9Copy full SHA for 75b5ac9
sentry-sidekiq/lib/sentry/sidekiq/error_handler.rb
@@ -55,7 +55,7 @@ def call(ex, context, sidekiq_config = nil)
55
private
56
57
def report_error(ex, context, hint: {})
58
- if Sentry.configuration.sidekiq.report_errors_via_rails
+ if Sentry.configuration.sidekiq.report_errors_via_rails && defined?(::Rails)
59
mechanism = Sentry::Mechanism.new(type: "sidekiq", handled: false)
60
::Rails.error.report(ex, context: { sidekiq: context, hint: hint.merge(mechanism: mechanism) }, handled: false)
61
else
0 commit comments