lib: don't send DockerException to sentry

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-04-08 22:03:10 +02:00
parent fb09c8f863
commit 37632bd0c7
1 changed files with 4 additions and 0 deletions

View File

@ -7,6 +7,7 @@ from channels_redis.core import ChannelFull
from django.core.exceptions import DisallowedHost, ValidationError from django.core.exceptions import DisallowedHost, ValidationError
from django.db import InternalError, OperationalError, ProgrammingError from django.db import InternalError, OperationalError, ProgrammingError
from django_redis.exceptions import ConnectionInterrupted from django_redis.exceptions import ConnectionInterrupted
from docker.errors import DockerException
from ldap3.core.exceptions import LDAPException from ldap3.core.exceptions import LDAPException
from redis.exceptions import ConnectionError as RedisConnectionError from redis.exceptions import ConnectionError as RedisConnectionError
from redis.exceptions import RedisError, ResponseError from redis.exceptions import RedisError, ResponseError
@ -28,6 +29,7 @@ def before_send(event, hint):
KeyboardInterrupt, KeyboardInterrupt,
ConnectionResetError, ConnectionResetError,
OSError, OSError,
PermissionError,
# Django DB Errors # Django DB Errors
OperationalError, OperationalError,
InternalError, InternalError,
@ -55,6 +57,8 @@ def before_send(event, hint):
SentryIgnoredException, SentryIgnoredException,
# ldap errors # ldap errors
LDAPException, LDAPException,
# Docker errors
DockerException,
) )
if "exc_info" in hint: if "exc_info" in hint:
_, exc_value, _ = hint["exc_info"] _, exc_value, _ = hint["exc_info"]