diff --git a/queue_job/controllers/main.py b/queue_job/controllers/main.py index a93c644841..4d1fc1683f 100644 --- a/queue_job/controllers/main.py +++ b/queue_job/controllers/main.py @@ -160,7 +160,7 @@ def _get_failure_values(self, job, traceback_txt, orig_exception): exception_name = orig_exception.__class__.__name__ if hasattr(orig_exception, "__module__"): exception_name = orig_exception.__module__ + "." + exception_name - exc_message = getattr(orig_exception, "name", str(orig_exception)) + exc_message = orig_exception.args[0] if orig_exception.args else str(orig_exception) return { "exc_info": traceback_txt, "exc_name": exception_name,