From 93e27d19591c41ed1b886c45a6bcef78c478287e Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sat, 21 Aug 2021 14:17:31 +0200 Subject: [PATCH] web: improve failed request handling Signed-off-by: Jens Langhammer --- authentik/lib/sentry.py | 2 ++ web/src/api/Sentry.ts | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index 5f434cae9..627df3f53 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -14,6 +14,8 @@ from django.http.response import Http404 from django_redis.exceptions import ConnectionInterrupted from docker.errors import DockerException from ldap3.core.exceptions import LDAPException + +# pylint: disable=no-name-in-module from psycopg2.errors import Error from redis.exceptions import ConnectionError as RedisConnectionError from redis.exceptions import RedisError, ResponseError diff --git a/web/src/api/Sentry.ts b/web/src/api/Sentry.ts index 84dc572a4..907094e7e 100644 --- a/web/src/api/Sentry.ts +++ b/web/src/api/Sentry.ts @@ -32,7 +32,7 @@ export function configureSentry(canDoPpi: boolean = false): Promise { return null; } } - if (hint.originalException instanceof Response) { + if (hint.originalException instanceof Response || hint.originalException instanceof DOMException) { return null; } if (event.exception) {