From 580e88c6fc37124073e849902656339d9194eead Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 27 Apr 2021 15:54:57 +0200 Subject: [PATCH] web: ignore network errors for sentry Signed-off-by: Jens Langhammer --- web/src/api/Sentry.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/web/src/api/Sentry.ts b/web/src/api/Sentry.ts index e012bfd05..7f0f39847 100644 --- a/web/src/api/Sentry.ts +++ b/web/src/api/Sentry.ts @@ -23,6 +23,11 @@ export function configureSentry(canDoPpi: boolean = false): Promise { if (hint.originalException instanceof SentryIgnoredError) { return null; } + if (hint.originalException instanceof Error) { + if (hint.originalException.name == 'NetworkError') { + return null; + } + } if (hint.originalException instanceof Response) { const response = hint.originalException as Response; // We only care about server errors