Files
weichen f3f23a3018 feat(errcode): 用稳定错误码记录 HTTP 与异步失败
失败响应此前不写日志,request_id 无法对照原因。注册表不覆盖处理器已经给出的 HTTP 状态。
2026-09-28 02:27:16 +00:00

20 lines
302 B
Go

package ctxmgr
import (
"context"
"chat-agent-system/internal/errcode"
)
func reportBackground(err error) {
if err == nil {
return
}
errcode.Report(context.Background(), errcode.Event{
Code: "CTXMGR_BACKGROUND",
Module: "ctxmgr",
Source: "async",
Upstream: err.Error(),
})
}