Skip to content

Commit

Permalink
fix(core): Add Google gmo error to Inbound Filters (#15432)
Browse files Browse the repository at this point in the history
closes #15389
  • Loading branch information
s1gr1d authored Feb 17, 2025
1 parent 5aca7ca commit 136370c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core/src/integrations/inboundfilters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const DEFAULT_IGNORE_ERRORS = [
/^Javascript error: Script error\.? on line 0$/,
/^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.
'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
Expand Down
11 changes: 11 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,12 @@ const GOOGLETAG_EVENT: Event = {
},
};

const GOOGLE_APP_GMO: Event = {
exception: {
values: [{ type: 'ReferenceError', value: "Can't find variable: gmo" }],
},
};

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

it('uses default filters (Google App "gmo")', () => {
const eventProcessor = createInboundFiltersEventProcessor();
expect(eventProcessor(GOOGLE_APP_GMO, {})).toBe(null);
});

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

0 comments on commit 136370c

Please sign in to comment.