From cec15f07c41af5f770c9c0b3f3416774236d499c Mon Sep 17 00:00:00 2001 From: "sentry[bot]" <39604003+sentry[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 19:36:29 +0000 Subject: [PATCH 1/2] Refine ad script error suppression logic --- src/router.tsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/router.tsx b/src/router.tsx index fc00c99e..832e02cd 100644 --- a/src/router.tsx +++ b/src/router.tsx @@ -87,7 +87,15 @@ export function getRouter() { errorMessage.includes('null is not an object') || errorMessage.includes('is not a function') - if (hasAdScriptFrame && hasExpectedErrorMessage) { + // Some ad script errors (e.g. Publift Fuse cross-origin iframe errors) have + // highly specific message patterns that identify them unambiguously, even when + // the stack trace has been obscured by Sentry's sentryWrapped helper and no + // ad-script frame is visible. Suppress these directly by message alone. + const isUnambiguousAdScriptError = + errorMessage.includes('window.top.document') || + errorMessage.includes('isPlacementXdom') + + if (isUnambiguousAdScriptError || (hasAdScriptFrame && hasExpectedErrorMessage)) { // Suppress the error - log to console in debug mode console.debug( 'Suppressed Publift Fuse/ad script error:', From e49daa91707ecd988b54d04de9206d1deca3fa2e Mon Sep 17 00:00:00 2001 From: "autofix-ci[bot]" <114827586+autofix-ci[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 19:37:22 +0000 Subject: [PATCH 2/2] ci: apply automated fixes --- src/router.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/router.tsx b/src/router.tsx index 832e02cd..3856d837 100644 --- a/src/router.tsx +++ b/src/router.tsx @@ -95,7 +95,10 @@ export function getRouter() { errorMessage.includes('window.top.document') || errorMessage.includes('isPlacementXdom') - if (isUnambiguousAdScriptError || (hasAdScriptFrame && hasExpectedErrorMessage)) { + if ( + isUnambiguousAdScriptError || + (hasAdScriptFrame && hasExpectedErrorMessage) + ) { // Suppress the error - log to console in debug mode console.debug( 'Suppressed Publift Fuse/ad script error:',