Improve Lark subagent provisioning errors#63
Conversation
Code ReviewSummary: Removes SubAgent welcome-card top-notice pinning, wraps all Lark API calls with structured error capture, and enriches error logging with HTTP status, Lark code/msg, and response body. 1. Stack trace lost when runLarkApiStep wraps HTTP/client errorssrc/channels/lark/subagent-provisioner.ts:376-382 - When the SDK throws an HTTP error, the original error is caught and replaced with a fresh LarkApiStepError. The original stack trace is discarded. Fix: Pass the original error as cause: throw new LarkApiStepError(ctx, details, { cause: error }) 2. No test coverage for Lark-level error codes through assertLarkOkassertLarkOk now throws LarkApiStepError for non-zero Lark codes on HTTP 200. The existing failure test covers HTTP-throw path but not assertLarkOk throw path. Fix: Add a test where a mocked API call returns non-zero Lark code without HTTP throw. 3. Documentation note is clear and actionableThe added tenant-scope note in docs/feishu-lark-setup.md is precise and helpful. VerdictBoth issues are non-blocking. Issue 1 is worth addressing now; issue 2 is a coverage gap. The core behavior change is correct. |
|
@claude Fixed in
Please review again. |
Summary
Tests