lib/sentry: ignore django validation error

This commit is contained in:
Jens Langhammer 2020-02-19 10:54:29 +01:00
parent e4886f0c6f
commit e27a05a7fc
1 changed files with 2 additions and 0 deletions

View File

@ -8,6 +8,7 @@ def before_send(event, hint):
"""Check if error is database error, and ignore if so""" """Check if error is database error, and ignore if so"""
from django_redis.exceptions import ConnectionInterrupted from django_redis.exceptions import ConnectionInterrupted
from django.db import OperationalError, InternalError from django.db import OperationalError, InternalError
from django.core.exceptions import ValidationError
from rest_framework.exceptions import APIException from rest_framework.exceptions import APIException
from billiard.exceptions import WorkerLostError from billiard.exceptions import WorkerLostError
from django.core.exceptions import DisallowedHost from django.core.exceptions import DisallowedHost
@ -24,6 +25,7 @@ def before_send(event, hint):
ConnectionResetError, ConnectionResetError,
KeyboardInterrupt, KeyboardInterrupt,
ClientError, ClientError,
ValidationError,
) )
if "exc_info" in hint: if "exc_info" in hint:
_exc_type, exc_value, _ = hint["exc_info"] _exc_type, exc_value, _ = hint["exc_info"]