From f879d81b28cea4bc7ff07ffc2db2362080138c71 Mon Sep 17 00:00:00 2001 From: bahtya Date: Sun, 12 Apr 2026 09:24:06 +0800 Subject: [PATCH] fix(channels/qq): propagate network errors in send() instead of swallowing The catch-all except Exception in QQ send() was swallowing aiohttp.ClientError and OSError that _send_media correctly re-raises. Add explicit catch for network errors before the generic handler. --- nanobot/channels/qq.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/nanobot/channels/qq.py b/nanobot/channels/qq.py index 96d9d5ecd..f109f6da6 100644 --- a/nanobot/channels/qq.py +++ b/nanobot/channels/qq.py @@ -280,6 +280,9 @@ class QQChannel(BaseChannel): msg_id=msg_id, content=msg.content.strip(), ) + except (aiohttp.ClientError, OSError): + # Network / transport errors — propagate so ChannelManager can retry + raise except Exception: logger.exception("Error sending QQ message to chat_id={}", msg.chat_id)