Skip to content

Commit a6aea25

Browse files
authored
Merge pull request #291 from Programcode/t3/sentry-react-b
Ignore wallet-provider {code, message} rejections in Sentry
2 parents 8f20171 + 46c1cfb commit a6aea25

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

‎src/lib/observability.ts‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,13 @@ async function loadSentry(): Promise<SentryModule | null> {
181181
dsn: sentryDsn,
182182
release: import.meta.env.VITE_SENTRY_RELEASE || undefined,
183183
environment: import.meta.env.VITE_SENTRY_ENVIRONMENT || import.meta.env.MODE,
184-
ignoreErrors: [/^Synthetic observability verification$/],
184+
ignoreErrors: [
185+
/^Synthetic observability verification$/,
186+
// Wallet providers that browsers and extensions inject into the page
187+
// reject with a plain { code, message } (EIP-1193). Nothing in the app
188+
// or its bundle rejects with that shape; our errors are Error objects.
189+
/^Object captured as promise rejection with keys: code, message$/,
190+
],
185191
// No sendDefaultPii: deprecated, and Sentry ignores it whenever
186192
// dataCollection is set. The block below is the only PII control.
187193
beforeBreadcrumb: filterObservabilityBreadcrumb,

0 commit comments

Comments
 (0)