Skip to content

Commit 01b9780

Browse files
authored
perf: ignore Object Not Found Matching Id error (#21365)
1 parent 6be144f commit 01b9780

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

apps/web/instrumentation-client.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@ Sentry.init({
2121
// Setting this option to true will print useful information to the console while you're setting up Sentry.
2222
debug: !!process.env.SENTRY_DEBUG,
2323
beforeSend(event) {
24+
if (
25+
event.exception?.values?.some(
26+
(e) =>
27+
// Ignore fake error "UnhandledRejection: Non-Error promise rejection captured with value: Object Not Found Matching Id:3, MethodName:update, ParamCount:4"
28+
// Raised GH issue: https://github.com/getsentry/sentry-javascript/issues/3440
29+
e.value?.includes("Non-Error promise rejection captured with") ||
30+
e.value?.includes("Object Not Found Matching Id")
31+
)
32+
) {
33+
return null;
34+
}
35+
2436
event.tags = {
2537
...event.tags,
2638
errorSource: "client",

0 commit comments

Comments
 (0)