mirror of
https://github.com/HKUDS/nanobot.git
synced 2026-04-15 07:29:52 +00:00
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.
This commit is contained in:
parent
fa98524944
commit
f879d81b28
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user