sentry-ruby icon indicating copy to clipboard operation
sentry-ruby copied to clipboard

RescuedExceptionInterceptor: Handle empty configuration

Open MrSerth opened this issue 4 months ago • 1 comments

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

MrSerth avatar Oct 10 '24 21:10 MrSerth