RescuedExceptionInterceptor: Handle empty configuration#2428
RescuedExceptionInterceptor: Handle empty configuration#2428solnic merged 1 commit intogetsentry:masterfrom MrSerth:patch-1
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.configurationwasnil. In this case, callingrailswould 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_exceptionsdefaults totrue, we assume this value here, too.Fixes #2386