From 61455ef19b16f9295ea324a169cdc0086eef299d Mon Sep 17 00:00:00 2001 From: Utkarsh Sengar Date: Sun, 31 May 2026 07:35:51 -0700 Subject: [PATCH] sentry: ignore Office add-in + ResizeObserver browser noise MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The "Object Not Found Matching Id:1, MethodName:update, ParamCount:4" unhandled rejection in Sentry (HTMLBIN-2) comes from the Microsoft Office Editor add-in misbehaving in the page context on Windows + Edge/Chrome — not our code. Filter it via Sentry.init({ ignoreErrors }). Bundle in the two ResizeObserver messages while we're here; same class of "browser implementation detail, not our bug" noise every Sentry project filters eventually. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 0c6d6a0..8995741 100644 --- a/src/index.ts +++ b/src/index.ts @@ -240,7 +240,13 @@ app.on(["GET", "HEAD"], "/sentry.js", (c) => { const publicKey = m[1]; const dsnJson = JSON.stringify(dsn); const keyJson = JSON.stringify(publicKey); - const body = `(function(){var s=document.createElement('script');s.src='https://js.sentry-cdn.com/'+${keyJson}+'.min.js';s.crossOrigin='anonymous';s.onload=function(){if(window.Sentry)window.Sentry.init({dsn:${dsnJson},tracesSampleRate:0.1});};document.head.appendChild(s);})();`; + // ignoreErrors filters third-party browser noise that bubbles into our + // unhandled-rejection handler: + // - "Object Not Found Matching Id" — MS Office Editor add-in misbehaving + // in the page context on Windows + Edge/Chrome. + // - ResizeObserver loop messages — benign Chrome implementation detail + // fired when an observer callback triggers another layout pass. + const body = `(function(){var s=document.createElement('script');s.src='https://js.sentry-cdn.com/'+${keyJson}+'.min.js';s.crossOrigin='anonymous';s.onload=function(){if(window.Sentry)window.Sentry.init({dsn:${dsnJson},tracesSampleRate:0.1,ignoreErrors:["Object Not Found Matching Id","ResizeObserver loop limit exceeded","ResizeObserver loop completed with undelivered notifications"]});};document.head.appendChild(s);})();`; return new Response(body, { headers }); });