Commit Graph
3 Commits
Author SHA1 Message Date
Vilius VystartasandXubin Ren 4d168c571c fix: replace raise with logger.error + return fail in exception handlers
The previous version changed return fail/pass to raise, which broke
graceful degradation — tests expect upload/content failures to be
caught and handled, not propagated.

Now logs errors with exc_info=True while preserving existing control
flow (return fail for upload/content send, stop typing for stream).
2026-05-09 01:04:20 +08:00
Vilius VystartasandXubin Ren 31c45fe798 fix: raise instead of swallowing on outbound-message path errors
Per reviewer request (chengyongru): raise exceptions on the outbound
message path so ChannelManager can trigger retry logic, matching the
pattern from commit 98c2f7cc (Weixin channel cleanup).

Changes:
- _resolve_server_upload_limit_bytes: warning → error (non-fatal config)
- _upload_and_send_attachment media upload: raise instead of swallow
- _upload_and_send_attachment room send: raise instead of swallow
- send_delta stream edit: error + raise after cleanup
- weixin _load_state: warning → error (non-fatal state load)
2026-05-09 01:04:20 +08:00
Vilius VystartasandXubin Ren ba1e5036f5 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.
2026-05-09 01:04:20 +08:00