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,
|
ValidationError,
|
||||||
OSError,
|
OSError,
|
||||||
RedisError,
|
RedisError,
|
||||||
SentryIgnoredException,
|
|
||||||
)
|
)
|
||||||
if "exc_info" in hint:
|
if "exc_info" in hint:
|
||||||
_exc_type, exc_value, _ = hint["exc_info"]
|
_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)
|
LOGGER.info("Supressing error %r", exc_value)
|
||||||
return None
|
return None
|
||||||
return event
|
return event
|
||||||
|
|
Reference in New Issue