From 7798292aa83d031a1e14c49b634f4bbe304b2291 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 5 Nov 2021 01:16:36 +0100 Subject: [PATCH] sources/plex: use exception_to_string in tasks Signed-off-by: Jens Langhammer --- authentik/sources/plex/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/authentik/sources/plex/tasks.py b/authentik/sources/plex/tasks.py index 57ecd08f5..fa86f29e1 100644 --- a/authentik/sources/plex/tasks.py +++ b/authentik/sources/plex/tasks.py @@ -3,6 +3,7 @@ from requests import RequestException from authentik.events.models import Event, EventAction from authentik.events.monitored_tasks import MonitoredTask, TaskResult, TaskResultStatus +from authentik.lib.utils.errors import exception_to_string from authentik.root.celery import CELERY_APP from authentik.sources.plex.models import PlexSource from authentik.sources.plex.plex import PlexAuth @@ -31,7 +32,7 @@ def check_plex_token(self: MonitoredTask, source_slug: int): self.set_status( TaskResult( TaskResultStatus.ERROR, - ["Plex token is invalid/an error occurred:", str(exc)], + ["Plex token is invalid/an error occurred:", exception_to_string(exc)], ) ) Event.new(