diff --git a/packages/core/src/integrations/inboundfilters.ts b/packages/core/src/integrations/inboundfilters.ts index 7d42d57f81ed..ac89c7d222c6 100644 --- a/packages/core/src/integrations/inboundfilters.ts +++ b/packages/core/src/integrations/inboundfilters.ts @@ -6,7 +6,11 @@ import { convertIntegrationFnToClass, defineIntegration } from '../integration'; // "Script error." is hard coded into browsers for errors that it can't read. // this is the result of a script being pulled in from an external domain and CORS. -const DEFAULT_IGNORE_ERRORS = [/^Script error\.?$/, /^Javascript error: Script error\.? on line 0$/]; +const DEFAULT_IGNORE_ERRORS = [ + /^Script error\.?$/, + /^Javascript error: Script error\.? on line 0$/, + /^ResizeObserver loop completed with undelivered notifications.$/, +]; /** Options for the InboundFilters integration */ export interface InboundFiltersOptions { diff --git a/packages/core/test/lib/integrations/inboundfilters.test.ts b/packages/core/test/lib/integrations/inboundfilters.test.ts index 012c3f5f5f0d..f3c29b0398d2 100644 --- a/packages/core/test/lib/integrations/inboundfilters.test.ts +++ b/packages/core/test/lib/integrations/inboundfilters.test.ts @@ -188,6 +188,17 @@ const SCRIPT_ERROR_EVENT: Event = { }, }; +const RESIZEOBSERVER_EVENT: Event = { + exception: { + values: [ + { + type: 'Error', + value: 'ResizeObserver loop completed with undelivered notifications.', + }, + ], + }, +}; + const MALFORMED_EVENT: Event = { exception: { values: [ @@ -294,6 +305,11 @@ describe('InboundFilters', () => { expect(eventProcessor(SCRIPT_ERROR_EVENT, {})).toBe(null); }); + it('uses default filters ResizeObserver', () => { + const eventProcessor = createInboundFiltersEventProcessor(); + expect(eventProcessor(RESIZEOBSERVER_EVENT, {})).toBe(null); + }); + it('filters on last exception when multiple present', () => { const eventProcessor = createInboundFiltersEventProcessor({ ignoreErrors: ['incorrect type given for parameter `chewToy`'],