capture_exception doesn't accept 'level' arg (#441)

This commit is contained in:
Michael Manfre 2023-01-18 16:05:50 -05:00 committed by GitHub
parent e5485b1430
commit 8ff4575976
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -30,16 +30,14 @@ def capture_message(message: str, level: str | None = None, scope=None, **scope_
print(message)
def capture_exception(
exception: BaseException, level: str | None = None, scope=None, **scope_args
):
def capture_exception(exception: BaseException, scope=None, **scope_args):
"""
Sends the exception to Sentry if it's configured
"""
if settings.SETUP.SENTRY_DSN:
from sentry_sdk import capture_exception
capture_exception(exception, level, scope, **scope_args)
capture_exception(exception, scope, **scope_args)
elif settings.DEBUG:
traceback.print_exc()