Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
1 change: 1 addition & 0 deletions packages/core/src/integrations/inboundfilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const DEFAULT_IGNORE_ERRORS = [
'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/
/^Non-Error promise rejection captured with value: Object Not Found Matching Id:\d+, MethodName:simulateEvent, ParamCount:\d+$/, // unactionable error from CEFSharp, a .NET library that embeds chromium in .NET apps
];

/** Options for the InboundFilters integration */
Expand Down
17 changes: 17 additions & 0 deletions packages/core/test/lib/integrations/inboundfilters.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,18 @@ const GOOGLETAG_EVENT: Event = {
},
};

const CEFSHARP_EVENT: Event = {
exception: {
values: [
{
type: 'TypeError',
value:
'Non-Error promise rejection captured with value: Object Not Found Matching Id:3, MethodName:simulateEvent, ParamCount:1',
},
],
},
};

const MALFORMED_EVENT: Event = {
exception: {
values: [
Expand Down Expand Up @@ -385,6 +397,11 @@ describe('InboundFilters', () => {
expect(eventProcessor(GOOGLETAG_EVENT, {})).toBe(null);
});

it('uses default filters (CEFSharp)', () => {
const eventProcessor = createInboundFiltersEventProcessor();
expect(eventProcessor(CEFSHARP_EVENT, {})).toBe(null);
});

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