Skip to content

Ignore wallet-provider {code, message} rejections in Sentry - #291

Merged
Programcode merged 1 commit into
mainfrom
t3/sentry-react-b
Nov 2, 2026
Merged

Programcode merged 1 commit into
mainfrom
t3/sentry-react-b

Conversation

@Programcode

Copy link
Copy Markdown
Owner

Sentry issue: JAVASCRIPT-REACT-B. UnhandledRejection: Object captured as promise rejection with keys: code, message on /, from one Avast Secure Browser 154 user on Windows. The event has no stack frames.

Cause

This is very likely a page-world script that the browser or an extension injected, not our code. Avast Secure Browser ships a crypto wallet, and wallet providers that follow EIP-1193 reject with a plain { code, message } object. I couldn't read the event itself because there's no Sentry API token on the VPS, so this comes from the code:

  • Nothing in src/ or packages/ rejects with a plain object. The only bare throw error sites rethrow Supabase errors, and those are real Error subclasses in supabase-js 2.114 (PostgrestError, AuthError, FunctionsError).
  • A scan of the production dist/assets bundle for reject({...}), throw {...} and {code:…,message:…} literals found nothing.
  • Jam's recorder.js and capture.js only build {code, message, …} objects inside zod issue reports. They don't reject with them.
  • The public / route doesn't hydrate any store.

To confirm, open the event's extra.__serialized__ in Sentry. A numeric code like 4xxx or -32xxx, or a chrome-extension:// breadcrumb, settles it.

Change

One more anchored entry in ignoreErrors in src/lib/observability.ts. It matches only an object whose own keys are exactly code and message. Supabase-shaped objects (code, details, hint, message) and real errors still report. If our own code ever rejected with exactly this shape, the filter would hide that too. The bundle has no such producer today.

Checks

  • npm run lint, npm run typecheck, npm test (94 guards): pass.
  • Ran the SDK's own eventFiltersIntegration with the new list. The target message is dropped, while code, details, hint, message and a TypeError are kept.
  • Skipped npm run verify and the browser suites, which can't exercise a Sentry filter.

Not merging: this is a production config change in src/lib/observability.ts, so it's Adam's call.

🤖 Generated with Claude Code

JAVASCRIPT-REACT-B is an unhandled rejection of a plain { code, message }
object on the home page, from one Avast Secure Browser user, with no stack
frames. That shape is what injected EIP-1193 wallet providers reject with.
No code in src/, packages/, the built bundle, or Jam's recorder scripts
rejects with it, so filter that exact message.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@Programcode
Programcode marked this pull request as ready for review November 2, 2026 08:21
Copilot AI balanced review requested due to automatic review settings November 2, 2026 08:21
@Programcode
Programcode merged commit a6aea25 into main Nov 2, 2026
3 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

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