From 6b7da71aa8f3f159ccce8be01c37f8246dbad1fc Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Tue, 15 Sep 2020 11:29:43 +0200 Subject: [PATCH] lib: improve error handling for sentry --- passbook/lib/sentry.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/passbook/lib/sentry.py b/passbook/lib/sentry.py index 99f51ef86..b232c1f2f 100644 --- a/passbook/lib/sentry.py +++ b/passbook/lib/sentry.py @@ -1,6 +1,7 @@ """passbook sentry integration""" from billiard.exceptions import WorkerLostError from botocore.client import ClientError +from celery.exceptions import CeleryError from django.core.exceptions import DisallowedHost, ValidationError from django.db import InternalError, OperationalError, ProgrammingError from django_redis.exceptions import ConnectionInterrupted @@ -8,6 +9,7 @@ from redis.exceptions import ConnectionError as RedisConnectionError from redis.exceptions import RedisError from rest_framework.exceptions import APIException from structlog import get_logger +from websockets.exceptions import WebSocketException LOGGER = get_logger() @@ -35,6 +37,8 @@ def before_send(event, hint): OSError, RedisError, SentryIgnoredException, + WebSocketException, + CeleryError, ) if "exc_info" in hint: _, exc_value, _ = hint["exc_info"]