So i wonder how to ignore a list of exceptions to not be sent to Sentry when migrating from Raven to Sentry SDK?
I tried returning None
in before_send
, but this doesn’t work, issues still created in Sentry.
def before_send_sentry_handler(event, hint):
if "exc_info" in hint:
exc_type, exc_value, tb = hint["exc_info"]
if isinstance(exc_value, (NotFound, MethodNotAllowed)):
# To discard Sentry event return None
return None
return event