From c8efc4bb82fece08e919c079474c6fab73777e72 Mon Sep 17 00:00:00 2001 From: AiwendilInTheWoods <2050361+AiwendilInTheWoods@users.noreply.github.com> Date: Sun, 16 Aug 2026 17:18:16 -0500 Subject: [PATCH] fix(cron): media-send failure logs an empty reason on timeout TimeoutError carries no message and str(TimeoutError()) is the empty string, so the media-send warning rendered with nothing after the colon. Fall back to the exception class name when str(e) is empty. --- cron/scheduler.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cron/scheduler.py b/cron/scheduler.py index 1f77030000f89..ce25d9cc5e74e 100644 --- a/cron/scheduler.py +++ b/cron/scheduler.py @@ -2188,7 +2188,13 @@ def _send_media_via_adapter( job.get("id", "?"), media_path, getattr(result, "error", "unknown"), ) except Exception as e: - logger.warning("Job '%s': failed to send media %s: %s", job.get("id", "?"), media_path, e) + # Argument-less exceptions (notably TimeoutError, the most likely + # failure on this path) have an empty str(), which would render this + # warning with no reason at all. Fall back to the class name. + logger.warning( + "Job '%s': failed to send media %s: %s", + job.get("id", "?"), media_path, str(e) or type(e).__name__, + ) def _confirm_adapter_delivery(send_result) -> bool: