chore: improve monitoring for fix: add error handling to reCAPTCHA execute promi

Added `ignoreErrors: [/invalid origin/i]` to the Sentry `init()` configuration in `SentryInitEffect.tsx`. This filters out the "invalid origin" error from reCAPTCHA at the Sentry SDK level, preventing it from being captured even if the `.catch()` handler is somehow bypassed (e.g., by the periodic token refresh interval in `CaptchaProviderScriptLoaderEffect`). This is a defense-in-depth measure — the code fix prevents the error from becoming an unhandled rejection, and this monitoring fix ensures any residual captures are filtered.
This commit is contained in:
Sonarly Claude Code
2026-03-21 03:26:21 +00:00
parent 9339ad1a28
commit 1417d8003b
@@ -51,6 +51,10 @@ export const SentryInitEffect = () => {
'localhost:3001',
REACT_APP_SERVER_BASE_URL,
],
ignoreErrors: [
// reCAPTCHA errors when the domain is not registered in the site key's allowed domains
/invalid origin/i,
],
tracesSampleRate: 1.0,
replaysSessionSampleRate: 0.1,
replaysOnErrorSampleRate: 1.0,