lib/sentry: fix SentryIgnoredException not being ignored correctly
This commit is contained in:
parent
8388120b06
commit
f1f4cbef9b
|
@ -32,11 +32,13 @@ def before_send(event, hint):
|
|||
ValidationError,
|
||||
OSError,
|
||||
RedisError,
|
||||
SentryIgnoredException,
|
||||
)
|
||||
if "exc_info" in hint:
|
||||
_exc_type, exc_value, _ = hint["exc_info"]
|
||||
if isinstance(exc_value, ignored_classes):
|
||||
# pylint: disable=consider-merging-isinstance
|
||||
if isinstance(exc_value, ignored_classes) or isinstance(
|
||||
exc_value, SentryIgnoredException
|
||||
):
|
||||
LOGGER.info("Supressing error %r", exc_value)
|
||||
return None
|
||||
return event
|
||||
|
|
Reference in New Issue