Skip to content

Commit fe456e4

Browse files
committed
Fix initialized check in Sentry::Rails::CaptureExceptions
1 parent 2d8fc6e commit fe456e4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

sentry-rails/lib/sentry/rails/capture_exceptions.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ def transaction_op
2727

2828
def capture_exception(exception, env)
2929
# the exception will be swallowed by ShowExceptions middleware
30+
return unless Sentry.initialized?
3031
return if show_exceptions?(exception, env) && !Sentry.configuration.rails.report_rescued_exceptions
3132

3233
Sentry::Rails.capture_exception(exception).tap do |event|

0 commit comments

Comments
 (0)