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
This commit is contained in:
Tom Moor authored and GitHub committed 2026-11-28 15:30:17 +00:00
1 parent d118448654
commit 46bdcc1a2d
1 file changed
+8 -1
+8 -1
View File
@@ -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)) {