From 9c33082c1d75ebdf6e119adfe766b8cf71adf868 Mon Sep 17 00:00:00 2001 From: Richard Fan Date: Wed, 1 Jul 2026 22:09:34 -0700 Subject: [PATCH] observability: include exception class in retry log lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit httpx transport-level exceptions (RemoteProtocolError, ConnectError, PoolTimeout, ConnectTimeout) stringify to "" — the current retry logs render as `Error: , retrying...` with no discriminating information. Adding `{type(e).__name__}` unblocks classification without changing behavior. Co-Authored-By: Claude Opus 4.7 (1M context) --- miles/utils/http_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miles/utils/http_utils.py b/miles/utils/http_utils.py index 0aaf792659..a5add0a0db 100644 --- a/miles/utils/http_utils.py +++ b/miles/utils/http_utils.py @@ -208,7 +208,7 @@ async def _post(client, url, payload, max_retries=60, action="post", headers=Non response_text = None logger.info( - f"Error: {e}, retrying... (attempt {retry_count}/{max_retries}, url={url}, response={response_text})" + f"Error: {type(e).__name__}: {e}, retrying... (attempt {retry_count}/{max_retries}, url={url}, response={response_text})" ) if retry_count >= max_retries: logger.info(f"Max retries ({max_retries}) reached, failing... (url={url})")