Skip to content

Commit 54b573c

Browse files
committed
fix(core): Filter out unactionable CEFSharp promise rejection error by default
1 parent a985d64 commit 54b573c

File tree

2 files changed

+18
-0
lines changed

2 files changed

+18
-0
lines changed

packages/core/src/integrations/inboundfilters.ts

+1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ const DEFAULT_IGNORE_ERRORS = [
1717
'can\'t redefine non-configurable property "solana"', // Probably a browser extension or custom browser (Brave) throwing this error
1818
"vv().getRestrictions is not a function. (In 'vv().getRestrictions(1,a)', 'vv().getRestrictions' is undefined)", // Error thrown by GTM, seemingly not affecting end-users
1919
"Can't find variable: _AutofillCallbackHandler", // Unactionable error in instagram webview https://developers.facebook.com/community/threads/320013549791141/
20+
/^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
2021
];
2122

2223
/** Options for the InboundFilters integration */

packages/core/test/lib/integrations/inboundfilters.test.ts

+17
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,18 @@ const GOOGLETAG_EVENT: Event = {
269269
},
270270
};
271271

272+
const CEFSHARP_EVENT: Event = {
273+
exception: {
274+
values: [
275+
{
276+
type: 'TypeError',
277+
value:
278+
'Non-Error promise rejection captured with value: Object Not Found Matching Id:3, MethodName:simulateEvent, ParamCount:1',
279+
},
280+
],
281+
},
282+
};
283+
272284
const MALFORMED_EVENT: Event = {
273285
exception: {
274286
values: [
@@ -385,6 +397,11 @@ describe('InboundFilters', () => {
385397
expect(eventProcessor(GOOGLETAG_EVENT, {})).toBe(null);
386398
});
387399

400+
it('uses default filters (CEFSharp)', () => {
401+
const eventProcessor = createInboundFiltersEventProcessor();
402+
expect(eventProcessor(CEFSHARP_EVENT, {})).toBe(null);
403+
});
404+
388405
it('filters on last exception when multiple present', () => {
389406
const eventProcessor = createInboundFiltersEventProcessor({
390407
ignoreErrors: ['incorrect type given for parameter `chewToy`'],

0 commit comments

Comments
 (0)