From a925418f60410f24a83b410eea2230d4b9ab27a8 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 20 May 2021 19:18:35 +0200 Subject: [PATCH] lib: don't send ImproperlyConfigured to sentry Signed-off-by: Jens Langhammer --- authentik/lib/sentry.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index 7ef05158f..f1aaf39d1 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -8,7 +8,11 @@ from botocore.exceptions import BotoCoreError from celery.exceptions import CeleryError from channels.middleware import BaseMiddleware from channels_redis.core import ChannelFull -from django.core.exceptions import SuspiciousOperation, ValidationError +from django.core.exceptions import ( + ImproperlyConfigured, + SuspiciousOperation, + ValidationError, +) from django.db import InternalError, OperationalError, ProgrammingError from django.http.response import Http404 from django_redis.exceptions import ConnectionInterrupted @@ -51,7 +55,8 @@ def before_send(event: dict, hint: dict) -> Optional[dict]: ConnectionResetError, OSError, PermissionError, - # Django DB Errors + # Django Errors + ImproperlyConfigured, OperationalError, InternalError, ProgrammingError,