Skip to content

fix(sdk-crash): Exclude React Native Supabase instrumentation from SDK crash detection#115259

Merged
antonis merged 2 commits into
masterfrom
antonis/fix-sdk-crash-supabase-false-positive
May 12, 2026
Merged

fix(sdk-crash): Exclude React Native Supabase instrumentation from SDK crash detection#115259
antonis merged 2 commits into
masterfrom
antonis/fix-sdk-crash-supabase-false-positive

Conversation

@antonis
Copy link
Copy Markdown
Contributor

@antonis antonis commented May 11, 2026

Summary

Adds an ignore matcher for the Sentry JS SDK's Supabase PostgREST instrumentation in React Native SDK crash detection.

The Supabase integration wraps PostgREST queries via a Proxy on the .then() method. When a user's Supabase query returns an error response, the integration intentionally captures it via captureException. However, because the Error object is constructed inside SDK code (new Error(res.error.message)), the resulting stack trace only contains SDK frames — which causes SDK crash detection to incorrectly flag it as an SDK crash.

Example false positive event: 8fdd05091597463dab5ef0c5ede751e0 (project 4506155486085120)

Changes

  • Adds a FunctionAndModulePattern ignoring Reflect.apply.then$argument_0 in @sentry/core/*/integrations/supabase*
  • Adds parametrized tests covering ESM/CJS builds, different function names, and different modules

Related

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

…K crash detection

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label May 11, 2026
@antonis antonis marked this pull request as ready for review May 11, 2026 10:57
@antonis antonis requested a review from a team as a code owner May 11, 2026 10:57
@antonis antonis merged commit f3b5310 into master May 12, 2026
64 checks passed
@antonis antonis deleted the antonis/fix-sdk-crash-supabase-false-positive branch May 12, 2026 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants