diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index e9eacfd8f..189f0d264 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -22,7 +22,7 @@ class SentryIgnoredException(Exception): """Base Class for all errors that are suppressed, and not sent to sentry.""" -def before_send(event, hint): +def before_send(event: dict, hint: dict) -> dict: """Check if error is database error, and ignore if so""" ignored_classes = ( # Inbuilt types @@ -64,4 +64,7 @@ def before_send(event, hint): _, exc_value, _ = hint["exc_info"] if isinstance(exc_value, ignored_classes): return None + if "logger" in event: + if event["logger"] in ["dbbackup"]: + return None return event