FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(core): [Data Collection 24] Narrow utility exception handling by adinauer · Pull Request #6065 · getsentry/sentry-java · GitHub

fix(core): [Data Collection 24] Narrow utility exception handling - #6065

Merged
adinauer merged 2 commits into
feat/data-collectionfrom
ref/data-collection-narrow-catches
Sep 8, 2026
Merged

adinauer merged 2 commits into
feat/data-collectionfrom
ref/data-collection-narrow-catches

Conversation

adinauer commented Sep 7, 2026
edited
Loading

Copy link
Copy Markdown
Member

PR Stack (Data Collection)


📜 Description

Narrow the exception handlers used while filtering GraphQL request bodies and decoding query parameter names. Keep malformed GraphQL Unicode escapes fail-closed by catching the vendored JSON reader's documented NumberFormatException alongside IOException.

💡 Motivation and Context

The previous catch (Throwable) blocks could swallow fatal JVM errors such as OutOfMemoryError and ThreadDeath. These handlers now catch only the recoverable failures produced by their parsing operations while preserving the existing fallback behavior for malformed input.

Refs #5666

💚 How did you test it?

  • ./gradlew :sentry:test --tests io.sentry.util.GraphqlUtilsTest --tests io.sentry.util.HttpUtilsTest --rerun-tasks
  • ./gradlew spotlessApply apiDump
  • git diff --check

📝 Checklist

  • I added GH Issue ID & Linear ID
  • I added tests to verify the changes.
  • No new PII added or SDK only sends newly added PII if sendDefaultPII is enabled.
  • I updated the docs if needed.
  • I updated the wizard if needed.
  • Review from the native team if needed.
  • No breaking change or entry added to the changelog.
  • No breaking change for hybrid SDKs or communicated to hybrid SDKs.
  • Public API changes reviewed by another Mobile SDK team member or implemented according to the develop docs spec.

🔮 Next steps

None.

#skip-changelog

⚠️ Merge this PR using a merge commit (not squash). Only the collection branch is squash-merged into main.

Catch only the recoverable failures produced while filtering GraphQL bodies and decoding query parameter names. Preserve fail-closed handling for malformed GraphQL Unicode escapes without swallowing fatal JVM errors.

Refs #5666

Co-Authored-By: Claude <noreply@anthropic.com>
This was referenced Sep 7, 2026

sentry Bot commented Sep 7, 2026
edited
Loading

Copy link
Copy Markdown

📲 Install Builds

Android

🔗 App Name App ID Version Configuration
SDK Size io.sentry.tests.size 8.55.0 (1) release

⚙️ sentry-android Build Distribution Settings

Bring the latest base branch fixes into this stacked branch.

Co-Authored-By: Claude <noreply@anthropic.com>
Base automatically changed from fix/data-collection-websocket-urls to feat/data-collection September 8, 2026 09:25

lbloder left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM 👍

adinauer marked this pull request as ready for review September 8, 2026 10:34
adinauer requested a review from romtsn as a code owner September 8, 2026 10:34
adinauer merged commit 6fab6c4 into feat/data-collection Sep 8, 2026
64 checks passed
adinauer deleted the ref/data-collection-narrow-catches branch September 8, 2026 10:34
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL