From bad0150a82cb746b37a4afb11f930fe17f918434 Mon Sep 17 00:00:00 2001 From: teg-atlassian Date: Thu, 5 Feb 2026 06:44:27 -0800 Subject: [PATCH] relaxing the constraint for unhandledRejection --- src/sentry.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sentry.ts b/src/sentry.ts index f576c3a79..99cb0fb07 100644 --- a/src/sentry.ts +++ b/src/sentry.ts @@ -175,13 +175,16 @@ export class SentryService { // Define filters that should block events from being sent const blockedFilters = [ - { key: 'capturedBy', value: 'process.unhandledRejectionHandler' }, + { key: 'capturedBy', value: 'unhandledRejection' }, { key: 'capturedBy', value: 'uncaughtExceptionHandler' }, { key: 'handled', value: 'no' }, ]; // Check if any filter matches - const shouldBlock = blockedFilters.some((filter) => tags?.[filter.key] === filter.value); + const shouldBlock = blockedFilters.some((filter) => { + const tagValue = tags?.[filter.key] as string; + return tagValue?.includes(filter.value); + }); return shouldBlock ? null : event; }