web: ignore network errors for sentry

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-27 15:54:57 +02:00
parent d82c01aa61
commit 580e88c6fc
1 changed files with 5 additions and 0 deletions

View File

@ -23,6 +23,11 @@ export function configureSentry(canDoPpi: boolean = false): Promise<Config> {
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