From 37632bd0c7728f47f5fa470347b00d5d9d2e0af8 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 8 Apr 2021 22:03:10 +0200 Subject: [PATCH] lib: don't send DockerException to sentry Signed-off-by: Jens Langhammer --- authentik/lib/sentry.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index d78cc2df4..e9eacfd8f 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -7,6 +7,7 @@ from channels_redis.core import ChannelFull from django.core.exceptions import DisallowedHost, ValidationError from django.db import InternalError, OperationalError, ProgrammingError from django_redis.exceptions import ConnectionInterrupted +from docker.errors import DockerException from ldap3.core.exceptions import LDAPException from redis.exceptions import ConnectionError as RedisConnectionError from redis.exceptions import RedisError, ResponseError @@ -28,6 +29,7 @@ def before_send(event, hint): KeyboardInterrupt, ConnectionResetError, OSError, + PermissionError, # Django DB Errors OperationalError, InternalError, @@ -55,6 +57,8 @@ def before_send(event, hint): SentryIgnoredException, # ldap errors LDAPException, + # Docker errors + DockerException, ) if "exc_info" in hint: _, exc_value, _ = hint["exc_info"]