Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/core/src/integrations/eventFilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const DEFAULT_IGNORE_ERRORS = [
/^ResizeObserver loop completed with undelivered notifications.$/, // The browser logs this when a ResizeObserver handler takes a bit longer. Usually this is not an actual issue though. It indicates slowness.
/^Cannot redefine property: googletag$/, // This is thrown when google tag manager is used in combination with an ad blocker
/^Can't find variable: gmo$/, // Error from Google Search App https://issuetracker.google.com/issues/396043331
"undefined is not an object (evaluating 'a.L')", // Random error that happens but not actionable or noticeable to end-users.
/^undefined is not an object \(evaluating 'a\.[A-Z]'\)$/, // Random error that happens but not actionable or noticeable to end-users.
'can\'t redefine non-configurable property "solana"', // Probably a browser extension or custom browser (Brave) throwing this error
"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)", // Error thrown by GTM, seemingly not affecting end-users
"Can't find variable: _AutofillCallbackHandler", // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/
Expand Down
11 changes: 11 additions & 0 deletions packages/core/test/lib/integrations/eventFilters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,12 @@ const TRANSACTION_EVENT_3: Event = {
type: 'transaction',
};

const UNDEFINED_IS_NOT_AN_OBJECT_EVENT: Event = {
exception: {
values: [{ type: 'TypeError', value: "undefined is not an object (evaluating 'a.L')" }],
},
};

describe.each([
// eslint-disable-next-line deprecation/deprecation
['InboundFilters', inboundFiltersIntegration],
Expand Down Expand Up @@ -439,6 +445,11 @@ describe.each([
expect(eventProcessor(FB_MOBILE_BROWSER_EVENT, {})).toBe(null);
});

it("uses default filters (undefined is not an object (evaluating 'a.L'))", () => {
const eventProcessor = createEventFiltersEventProcessor(integrationFn);
expect(eventProcessor(UNDEFINED_IS_NOT_AN_OBJECT_EVENT, {})).toBe(null);
});

it('filters on last exception when multiple present', () => {
const eventProcessor = createEventFiltersEventProcessor(integrationFn, {
ignoreErrors: ['incorrect type given for parameter `chewToy`'],
Expand Down
Loading