From 46bdcc1a2d758d78343d2957f286fadf1146f94a Mon Sep 17 00:00:00 2001 From: Tom Moor Date: Sat, 28 Nov 2026 10:30:17 -0500 Subject: [PATCH] fix: Ignore expected client errors in Sentry when Error is wrapped (#14790) * fix: Ignore expected client errors in Sentry when Error is wrapped * fix: Let DOM NotFoundError reach the translation filter --- app/utils/sentry.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/app/utils/sentry.ts b/app/utils/sentry.ts index 7f5e216809..4a078c8c79 100644 --- a/app/utils/sentry.ts +++ b/app/utils/sentry.ts @@ -77,7 +77,14 @@ export function initSentry(history: History) { ], beforeSend(event, hint) { const error = hint.originalException; - if (error instanceof Error && ignoredErrorNames.has(error.name)) { + if ( + typeof error === "object" && + error !== null && + !(error instanceof DOMException) && + "name" in error && + typeof error.name === "string" && + ignoredErrorNames.has(error.name) + ) { return null; } if (isTranslatedPageError(error)) {