lib: don't send ImproperlyConfigured to sentry

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-05-20 19:18:35 +02:00
parent ffd61d0e60
commit a925418f60

View file

@ -8,7 +8,11 @@ from botocore.exceptions import BotoCoreError
from celery.exceptions import CeleryError from celery.exceptions import CeleryError
from channels.middleware import BaseMiddleware from channels.middleware import BaseMiddleware
from channels_redis.core import ChannelFull 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.db import InternalError, OperationalError, ProgrammingError
from django.http.response import Http404 from django.http.response import Http404
from django_redis.exceptions import ConnectionInterrupted from django_redis.exceptions import ConnectionInterrupted
@ -51,7 +55,8 @@ def before_send(event: dict, hint: dict) -> Optional[dict]:
ConnectionResetError, ConnectionResetError,
OSError, OSError,
PermissionError, PermissionError,
# Django DB Errors # Django Errors
ImproperlyConfigured,
OperationalError, OperationalError,
InternalError, InternalError,
ProgrammingError, ProgrammingError,