Skip to content

fix: Prevent Sentry from capturing router notFound/redirect signals - #1192

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/sentry-router-signals
Open

fix: Prevent Sentry from capturing router notFound/redirect signals#1192
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/sentry-router-signals

Conversation

@sentry

@sentry sentry Bot commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

The DefaultCatchBoundary component was inadvertently reporting TanStack Router's notFound() and redirect() control-flow signals as exceptions to Sentry. These signals are not actual errors but mechanisms for router navigation.

This change modifies src/components/DefaultCatchBoundary.tsx to:

  • Import isNotFound and isRedirect utilities from @tanstack/react-router.
  • Add a conditional check within the useEffect hook to prevent Sentry.captureException from being called if the caught 'error' is identified as a notFound or redirect signal. This ensures Sentry only captures genuine exceptions, reducing noise and improving error monitoring accuracy.

Fixes TANSTACK-COM-31Q

This PR was automatically generated by Sentry. You can adjust this setting at any time.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Aug 29, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
tanstack-com 932c2c0 Commit Preview URL

Branch Preview URL
Aug 29 2026, 11:03 PM

@tannerlinsley tannerlinsley added the source-audit Tracked by the automated source audit label Aug 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

source-audit Tracked by the automated source audit

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant