From a8926cbd070a02433d87043d6bb911929a4f077d Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Sun, 23 Feb 2020 19:48:14 +0100 Subject: [PATCH] lib: add more errors to sentry ignore --- passbook/lib/sentry.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/passbook/lib/sentry.py b/passbook/lib/sentry.py index 453df529e..f50b612aa 100644 --- a/passbook/lib/sentry.py +++ b/passbook/lib/sentry.py @@ -1,4 +1,11 @@ """passbook sentry integration""" +from billiard.exceptions import WorkerLostError +from botocore.client import ClientError +from django.core.exceptions import DisallowedHost, ValidationError +from django.db import InternalError, OperationalError, ProgrammingError +from django_redis.exceptions import ConnectionInterrupted +from redis.exceptions import RedisError +from rest_framework.exceptions import APIException from structlog import get_logger LOGGER = get_logger() @@ -10,20 +17,12 @@ class SentryIgnoredException(Exception): def before_send(event, hint): """Check if error is database error, and ignore if so""" - from django_redis.exceptions import ConnectionInterrupted - from django.db import OperationalError, InternalError - from django.core.exceptions import ValidationError - from rest_framework.exceptions import APIException - from billiard.exceptions import WorkerLostError - from django.core.exceptions import DisallowedHost - from botocore.client import ClientError - from redis.exceptions import RedisError - ignored_classes = ( OperationalError, + InternalError, + ProgrammingError, ConnectionInterrupted, APIException, - InternalError, ConnectionResetError, WorkerLostError, DisallowedHost,