capture_exception doesn't accept 'level' arg (#441)
This commit is contained in:
parent
e5485b1430
commit
8ff4575976
|
@ -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()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue