lib: don't send 404 errors to sentry

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-29 15:25:54 +02:00
parent bb2c4423b0
commit 35f0e6b88d
1 changed files with 3 additions and 0 deletions

View File

@ -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"]