From d48d79fa8370b0243ad93215c25941116a2971cb Mon Sep 17 00:00:00 2001 From: Jonathan Poltak Samosir Date: Fri, 17 May 2024 13:23:14 +0700 Subject: [PATCH] Ignore sending a bunch of errors to sentry - We've been through all of these and determined they're either inconsequential or non-interesting and are just using up our sentry req quota. Thus we're choosing to ignore these ones --- src/util/raven.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/util/raven.ts b/src/util/raven.ts index b4576b7522..0820af48c6 100644 --- a/src/util/raven.ts +++ b/src/util/raven.ts @@ -24,6 +24,7 @@ export default function initSentry({ shouldSendCallback: () => sentryEnabled, whitelistUrls: [extUrlPattern], includePaths: [extUrlPattern], + ignoreErrors: IGNORED_ERRORS, }) .install() @@ -48,3 +49,26 @@ export const captureException = ( ) => raven.captureException(error, context) export const captureBreadcrumb = (details: any) => raven.captureBreadcrumb(details) + +const IGNORED_ERRORS = [ + `No registered remote function called handleHistoryStateUpdate`, + `No registered remote function called confirmTabScriptLoaded`, + `No registered remote function called teardownContentScripts`, + `Error: Could not get a port to content-script-background`, + `Cannot destructure property 'id' of 'i' as it is undefined.`, + `NotAllowedError: Registration failed - permission denied`, + `An error occurred. See https://git.io/JUIaE#17 for more information.`, + `AbortError: Registration failed - push service error`, + `Could not establish connection. Receiving end does not exist.`, + `Error: Cannot inject content-scripts into page`, + `Error: No tab with id:`, + `Unable to download all specified images.`, + `Could not establish connection. Receiving end does not exist.`, + `A listener indicated an asynchronous response by returning true`, + `DatabaseClosedError: UnknownError`, + `DatabaseClosedError: InvalidStateError`, + `DatabaseClosedError: UpgradeError`, + `UpgradeError Not yet support for changing primary key`, + `Tried to do 'findObjects' operation on non-existing collection: settings`, + `Invariant Violation: update(): You provided an invalid spec to update().`, +]