Repository navigation
fix: [Throwable Boundaries 4] Rethrow fatal errors at JVM integration boundaries - #6660
Draft
runningcode wants to merge 1 commit into
Draft
runningcode wants to merge 1 commit into
runningcode wants to merge 1 commit into
Conversation
The broad catches in the Apollo, Kafka, Logback, Quartz, Spotlight and Spring integrations swallowed every Throwable, including OutOfMemoryError and StackOverflowError. Each now calls ExceptionUtils.rethrowIfFatal first and says why it is broad and what happens on failure. None of them needs a LinkageError arm: the calls into the framework outside these catches need the same APIs, so a mismatched version fails before them. The user-facing callbacks and options these catches wrap say how a failure shows up: Apollo's BeforeSpanCallback, SentryAppender's encoder, and the slug of @SentryCheckIn. Refs JAVA-552 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Nov 18, 2026
Draft
5 of 9 tasks
📲 Install BuildsAndroid
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PR Stack (Throwable Boundaries)
📜 Description
This PR handles the 28 remaining swallowing
catch (Throwable)sites in the JVM integrations:sentry-apollo-3,sentry-apollo-4,sentry-kafka,sentry-logback,sentry-quartz,sentry-spotlight,sentry-spring,sentry-spring-jakartaandsentry-spring-7.ExceptionUtils.rethrowIfFatalfirst, with a comment saying why the catch is broad and what is lost when it fails:beforeSpancallback, the request body'swriteTo(the app's upload code, left for this pass by ref: Narrow Throwable catches to the exceptions they guard (JAVA-552) #6564), and the failed-request event.jobToBeExecutedandjobWasExecuted.configureScope.SentryKafkaConsumerTracing'scatch (Throwable t) { throwUnchecked(t); }already rethrows everything.BeforeSpanCallback.executein Apollo 3 and 4SentryAppender.setEncoderSentryCheckIn.valuein the three Spring modulesNo catch needed a
LinkageErrorarm. The calls they guard use the same framework APIs as the code outside them, so a mismatched version fails before reaching them.💡 Motivation and Context
This is the JVM integrations part of the
rethrowIfFatalboundary pass.💚 How did you test it?
OutOfMemoryErrorpropagates from the Apollo 3 and 4beforeSpancallbacks and from the Logback encoder.📝 Checklist
sendDefaultPIIis enabled.🔮 Next steps
#skip-changelog
🤖 Generated with Claude Code