mirror of
https://github.com/hansjone/dsh-im-ops.git
synced 2026-10-09 05:20:46 +08:00
feat: add structured message failure reporting
This commit is contained in:
parent
b42fc411c2
commit
ad3c08ace3
59 changed files with 2405 additions and 607 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import { normalizeAgentPresetCatalog, normalizeAgentPresetId, SET_AGENT_PRESET_ENDPOINT } from '../../agent-preset.js';
|
||||
import { normalizeLastMessageError } from '../../last-message-error.js';
|
||||
|
||||
export const WECOM_RPC_CHANNEL = '/wecom';
|
||||
|
||||
|
|
@ -103,6 +104,7 @@ function normalizeBot(value) {
|
|||
summary: text(value.health?.summary, connected ? '企业微信 WebSocket 长连接运行正常' : '企业微信连接尚未就绪'),
|
||||
lastCheckedAt: timestamp(value.health?.lastCheckedAt),
|
||||
},
|
||||
lastMessageError: normalizeLastMessageError(value.lastMessageError),
|
||||
error: isRecord(value.error) ? {
|
||||
code: text(value.error.code, 'WECOM_ACCOUNT_ERROR', 80),
|
||||
message: text(value.error.message, '企业微信连接尚未就绪'),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue