fix: log errors in silent exception handlers (matrix + weixin channels)

The Matrix channel had 4 bare except blocks that silently swallowed
transport errors with no logging — stream send/edit failures, media
upload failures, server config fetch failures, and room content send
failures. The Weixin channel had 1 silent state-load failure.

This mirrors commit 98c2f7cc ('fix(weixin): raise exceptions instead
of silently dropping messages') for the Matrix channel and adds a
warning for the remaining silent catch in Weixin's _load_state.

All failures now log at warning level with exc_info=True so operators
can diagnose intermittent Matrix/Weixin transport issues.
This commit is contained in:
Vilius Vystartas
2026-05-09 01:04:20 +08:00
committed by Xubin Ren
parent 843e96f09d
commit ba1e5036f5
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -208,6 +208,7 @@ class WeixinChannel(BaseChannel):
self.config.base_url = base_url
return bool(self._token)
except Exception:
self.logger.warning("Failed to load Weixin account state", exc_info=True)
return False
def _save_state(self) -> None: