-
-
Notifications
You must be signed in to change notification settings - Fork 494
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RescuedExceptionInterceptor: Handle empty configuration #2428
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2428 +/- ##
==========================================
- Coverage 98.18% 98.15% -0.03%
==========================================
Files 126 126
Lines 4726 4728 +2
==========================================
+ Hits 4640 4641 +1
- Misses 86 87 +1
|
Previously, it could happen that `Sentry.configuration` was `nil`. In this case, calling `rails` would produce a `NoMethodError`. We fix this issue by using safe navigation. Furthermore, this commit ensures we use a reasonable default in case the configuration couldn't be loaded. Since the config `report_rescued_exceptions` defaults to `true`, we assume this value here, too. Fixes #2386
Sorry but I'm having second thoughts about this, it's the same as I outlined here #2396 (comment) |
I've had a quick look at the two test failures. The second one is caused by Docker Pull Limits, the first one failed when setting up Ruby 2.5. Both don't look related, I'd say. How can we proceed here? |
I handled those failures. We should be good to merge this. |
Previously, it could happen that
Sentry.configuration
wasnil
. In this case, callingrails
would produce aNoMethodError
. We fix this issue by using safe navigation.Furthermore, this commit ensures we use a reasonable default in case the configuration couldn't be loaded. Since the config
report_rescued_exceptions
defaults totrue
, we assume this value here, too.Fixes #2386