From db9ea8603ca93439ee4b5a38cc4f3c6a6a09fe63 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 28 Nov 2021 15:17:27 +0100 Subject: [PATCH] web: cleanup sentry error catching Signed-off-by: Jens Langhammer --- web/src/api/Sentry.ts | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/web/src/api/Sentry.ts b/web/src/api/Sentry.ts index ec4d897ba..70dee4290 100644 --- a/web/src/api/Sentry.ts +++ b/web/src/api/Sentry.ts @@ -15,7 +15,8 @@ export function configureSentry(canDoPpi: boolean = false): Promise { Sentry.init({ dsn: "https://a579bb09306d4f8b8d8847c052d3a1d3@sentry.beryju.org/8", ignoreErrors: [ - /network/i, + /network/ig, + /fetch/ig, ], release: `authentik@${VERSION}`, tunnel: "/api/v3/sentry/", @@ -30,14 +31,6 @@ export function configureSentry(canDoPpi: boolean = false): Promise { if (hint.originalException instanceof SentryIgnoredError) { return null; } - if ((hint.originalException as Error | undefined)?.hasOwnProperty("name")) { - if ((hint.originalException as Error | undefined)?.name == 'NetworkError') { - return null; - } - if ((hint.originalException as Error | undefined)?.name.includes("fetch")) { - return null; - } - } if (hint.originalException instanceof Response || hint.originalException instanceof DOMException) { return null; }