fix(wecom): improve error handling for late reply proactive push delivery
This commit is contained in:
parent
10c7835a1a
commit
d065f7ce49
1 changed files with 1 additions and 1 deletions
|
|
@ -286,7 +286,7 @@ func (c *WeComAIBotWSChannel) Send(ctx context.Context, msg bus.OutboundMessage)
|
||||||
if err := c.wsSendActivePush(route.ChatID, route.ChatType, msg.Content); err != nil {
|
if err := c.wsSendActivePush(route.ChatID, route.ChatType, msg.Content); err != nil {
|
||||||
logger.WarnCF("wecom_aibot", "Late reply proactive push failed",
|
logger.WarnCF("wecom_aibot", "Late reply proactive push failed",
|
||||||
map[string]any{"req_id": msg.ChatID, "chat_id": route.ChatID, "error": err})
|
map[string]any{"req_id": msg.ChatID, "chat_id": route.ChatID, "error": err})
|
||||||
return err
|
return fmt.Errorf("response_url delivery failed: %w", channels.ErrSendFailed)
|
||||||
}
|
}
|
||||||
logger.InfoCF("wecom_aibot", "Late reply delivered via proactive push",
|
logger.InfoCF("wecom_aibot", "Late reply delivered via proactive push",
|
||||||
map[string]any{"req_id": msg.ChatID, "chat_id": route.ChatID, "chat_type": route.ChatType})
|
map[string]any{"req_id": msg.ChatID, "chat_id": route.ChatID, "chat_type": route.ChatType})
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue