You've already forked VptPassiveAdapter
fix(continuity_report): 更新业务响应码检查逻辑
- 修改了响应码检查条件,添加对 200 状态码的处理 - 保持原有的错误日志记录和追踪状态设置功能
This commit is contained in:
@@ -129,7 +129,7 @@ func reportSingleDevice(ctx context.Context, result dto.ContinuityCheckResult) e
|
||||
}
|
||||
|
||||
// 检查业务响应码
|
||||
if response.Code != 0 {
|
||||
if response.Code != 0 && response.Code != 200 {
|
||||
errMsg := fmt.Sprintf("上报失败: code=%d, msg=%s", response.Code, response.Msg)
|
||||
span.SetAttributes(attribute.String("error", errMsg))
|
||||
span.SetStatus(codes.Error, "上报失败")
|
||||
|
||||
Reference in New Issue
Block a user