diff --git a/CHANGELOG.md b/CHANGELOG.md index c94d409d467..580f6c74f0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -223,6 +223,7 @@ Docs: https://docs.openclaw.ai - Feishu/topic root replies: prefer `root_id` as outbound `replyTargetMessageId` when present, and parse millisecond `message_create_time` values correctly so topic replies anchor to the root message in grouped thread flows. (#29968) Thanks @bmendonca3. - Feishu/DM pairing reply target: send pairing challenge replies to `chat:` instead of `user:` so Lark/Feishu private chats with user-id-only sender payloads receive pairing messages reliably. (#31403) Thanks @stakeswky. - Feishu/Lark private DM routing: treat inbound `chat_type: "private"` as direct-message context for pairing/mention-forward/reaction synthetic handling so Lark private chats behave like Feishu p2p DMs. (#31400) Thanks @stakeswky. +- Feishu/streaming card transport error handling: check `response.ok` before parsing JSON in token and card create requests so non-JSON HTTP error responses surface deterministic status failures. (#35628) Thanks @Sid-Qin. - Signal/message actions: allow `react` to fall back to `toolContext.currentMessageId` when `messageId` is omitted, matching Telegram behavior and unblocking agent-initiated reactions on inbound turns. (#32217) Thanks @dunamismax. - Discord/message actions: allow `react` to fall back to `toolContext.currentMessageId` when `messageId` is omitted, matching Telegram/Signal reaction ergonomics in inbound turns. - Synology Chat/reply delivery: resolve webhook usernames to Chat API `user_id` values for outbound chatbot replies, avoiding mismatches between webhook user IDs and `method=chatbot` recipient IDs in multi-account setups. (#23709) Thanks @druide67. diff --git a/extensions/feishu/src/streaming-card.ts b/extensions/feishu/src/streaming-card.ts index 45db480d360..856c3c2fecd 100644 --- a/extensions/feishu/src/streaming-card.ts +++ b/extensions/feishu/src/streaming-card.ts @@ -67,6 +67,10 @@ async function getToken(creds: Credentials): Promise { policy: { allowedHostnames: resolveAllowedHostnames(creds.domain) }, auditContext: "feishu.streaming-card.token", }); + if (!response.ok) { + await release(); + throw new Error(`Token request failed with HTTP ${response.status}`); + } const data = (await response.json()) as { code: number; msg: string; @@ -198,6 +202,10 @@ export class FeishuStreamingSession { policy: { allowedHostnames: resolveAllowedHostnames(this.creds.domain) }, auditContext: "feishu.streaming-card.create", }); + if (!createRes.ok) { + await releaseCreate(); + throw new Error(`Create card request failed with HTTP ${createRes.status}`); + } const createData = (await createRes.json()) as { code: number; msg: string;