From 31ba543c625eb2a4d870a06848b07471376a0708 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Mon, 3 Jan 2022 21:33:52 +0100 Subject: [PATCH] *: don't use exception keyword with structlog Signed-off-by: Jens Langhammer --- authentik/lib/sentry.py | 2 +- authentik/root/celery.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/authentik/lib/sentry.py b/authentik/lib/sentry.py index 5744d1623..05132aadb 100644 --- a/authentik/lib/sentry.py +++ b/authentik/lib/sentry.py @@ -97,7 +97,7 @@ def before_send(event: dict, hint: dict) -> Optional[dict]: if "exc_info" in hint: _, exc_value, _ = hint["exc_info"] if isinstance(exc_value, ignored_classes): - LOGGER.debug("dropping exception", exception=exc_value) + LOGGER.debug("dropping exception", exc=exc_value) return None if "logger" in event: if event["logger"] in [ diff --git a/authentik/root/celery.py b/authentik/root/celery.py index ad6c8bcbd..a4d6a36d1 100644 --- a/authentik/root/celery.py +++ b/authentik/root/celery.py @@ -69,7 +69,7 @@ def task_error_hook(task_id, exception: Exception, traceback, *args, **kwargs): """Create system event for failed task""" from authentik.events.models import Event, EventAction - LOGGER.warning("Task failure", exception=exception) + LOGGER.warning("Task failure", exc=exception) if before_send({}, {"exc_info": (None, exception, None)}) is not None: Event.new(EventAction.SYSTEM_EXCEPTION, message=exception_to_string(exception)).save()