From d1d28722d2d380c753daa1fa98a747e17e1458f9 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 29 Apr 2021 15:25:54 +0200 Subject: [PATCH] lib: don't send 404 errors to sentry Signed-off-by: Jens Langhammer --- authentik/lib/sentry.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index 27c5bd020..79a7b0d53 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -9,6 +9,7 @@ from channels.middleware import BaseMiddleware from channels_redis.core import ChannelFull from django.core.exceptions import SuspiciousOperation, ValidationError from django.db import InternalError, OperationalError, ProgrammingError +from django.http.response import Http404 from django_redis.exceptions import ConnectionInterrupted from docker.errors import DockerException from ldap3.core.exceptions import LDAPException @@ -78,6 +79,8 @@ def before_send(event: dict, hint: dict) -> Optional[dict]: LDAPException, # Docker errors DockerException, + # End-user errors + Http404, ) if "exc_info" in hint: _, exc_value, _ = hint["exc_info"]