Skip to content

fix(feishu): add return_exceptions to asyncio.gather in comment handler - #58970

Closed
x7peeps wants to merge 2 commits into
NousResearch:mainfrom
x7peeps:fix/feishu-gather-return-exceptions
Closed

fix(feishu): add return_exceptions to asyncio.gather in comment handler#58970
x7peeps wants to merge 2 commits into
NousResearch:mainfrom
x7peeps:fix/feishu-gather-return-exceptions

Conversation

@x7peeps

@x7peeps x7peeps commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

Add to in the feishu comment handler so that a failure in one parallel fetch (doc meta or comment detail) does not crash the entire handler.

Problem

In , line 1205 calls without . If either or raises (e.g., network error, API rate limit), the gather propagates the exception immediately, cancelling the other task and failing the entire comment handling flow. The code then calls on both results, which would also crash on an exception value.

Fix

  • Added to the gather call
  • After gather, check if either result is an Exception and log a warning with an empty dict fallback
  • Minimal diff: +10 / -1 lines, only touches the gather site

Testing

  • Syntax check passed (py_compile)
  • Behavior verified

@alt-glitch alt-glitch added type/bug Something isn't working comp/plugins Plugin system and bundled plugins comp/gateway Gateway runner, session dispatch, delivery platform/feishu Feishu / Lark adapter platform/qqbot QQ Bot adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages P3 Low — cosmetic, nice to have labels Jul 5, 2026
@alt-glitch

Copy link
Copy Markdown
Collaborator

This was generated by AI during triage.

Related: #36888 (the earlier, now-closed feishu return_exceptions fix). This PR re-does that feishu fix and additionally bundles an unrelated gateway/platforms/qqbot/chunked_upload.py one-liner despite the feishu-only title — maintainer may want the qqbot change split out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gateway Gateway runner, session dispatch, delivery comp/plugins Plugin system and bundled plugins P3 Low — cosmetic, nice to have platform/feishu Feishu / Lark adapter platform/qqbot QQ Bot adapter sweeper:risk-message-delivery Sweeper risk: may drop, duplicate, misroute, or suppress messages type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants