From 01b9780938f8df36642cdb2b4ab0daea72b4f33a Mon Sep 17 00:00:00 2001 From: Benny Joo Date: Fri, 16 May 2025 19:11:33 -0400 Subject: [PATCH] perf: ignore Object Not Found Matching Id error (#21365) --- apps/web/instrumentation-client.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/apps/web/instrumentation-client.ts b/apps/web/instrumentation-client.ts index 21d2469be3..ee23de9c0a 100644 --- a/apps/web/instrumentation-client.ts +++ b/apps/web/instrumentation-client.ts @@ -21,6 +21,18 @@ Sentry.init({ // Setting this option to true will print useful information to the console while you're setting up Sentry. debug: !!process.env.SENTRY_DEBUG, beforeSend(event) { + if ( + event.exception?.values?.some( + (e) => + // Ignore fake error "UnhandledRejection: Non-Error promise rejection captured with value: Object Not Found Matching Id:3, MethodName:update, ParamCount:4" + // Raised GH issue: https://github.com/getsentry/sentry-javascript/issues/3440 + e.value?.includes("Non-Error promise rejection captured with") || + e.value?.includes("Object Not Found Matching Id") + ) + ) { + return null; + } + event.tags = { ...event.tags, errorSource: "client",