From dd6a38d5eabc011237d6e0305b559667408cf9d6 Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Thu, 16 Nov 2023 18:05:52 -0500 Subject: [PATCH] Properly pass the name of the exception --- daemon-common/celery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/daemon-common/celery.py b/daemon-common/celery.py index ae521b2a..fa3223fe 100644 --- a/daemon-common/celery.py +++ b/daemon-common/celery.py @@ -45,7 +45,7 @@ def fail(celery, msg, exception=None, current=1, total=1): if exception is None: exception = TaskFailure - msg = f"{exception}: {msg}" + msg = f"{type(exception()).__name__}: {msg}" logger = getLogger(__name__) logger.error(msg)