From e27a05a7fc69833445ac0714b7476001a914c6bc Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 19 Feb 2020 10:54:29 +0100 Subject: [PATCH] lib/sentry: ignore django validation error --- passbook/lib/sentry.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/passbook/lib/sentry.py b/passbook/lib/sentry.py index ec5d475a1..f0ae95f76 100644 --- a/passbook/lib/sentry.py +++ b/passbook/lib/sentry.py @@ -8,6 +8,7 @@ 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 @@ -24,6 +25,7 @@ def before_send(event, hint): ConnectionResetError, KeyboardInterrupt, ClientError, + ValidationError, ) if "exc_info" in hint: _exc_type, exc_value, _ = hint["exc_info"]