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
1 changed files with 2 additions and 4 deletions

View File

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