Skip to content

Commit cd4913f

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

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Unreleased
1+
## 6.1.1
22

33
### Improvements
44

@@ -8,6 +8,7 @@
88

99
- Properly skip silenced `ActiveRecord::Base.logger`'s log entries in the ActiveRecord log subscriber ([#2775](https://github.com/getsentry/sentry-ruby/pull/2775))
1010
- Skip malformed utf-8 messages ([#2777](https://github.com/getsentry/sentry-ruby/pull/2777))
11+
- Fix initialized check in Sentry::Rails::CaptureExceptions ([#2783](https://github.com/getsentry/sentry-ruby/pull/2783))
1112

1213
## 6.1.0
1314

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)