From 669ae42051f59139fc0418f403f7ddff0d63c0b5 Mon Sep 17 00:00:00 2001 From: Jerry Yan <792602257@qq.com> Date: Tue, 30 Dec 2025 10:55:50 +0800 Subject: [PATCH] =?UTF-8?q?fix(continuity=5Freport):=20=E6=9B=B4=E6=96=B0?= =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=93=8D=E5=BA=94=E7=A0=81=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 修改了响应码检查条件,添加对 200 状态码的处理 - 保持原有的错误日志记录和追踪状态设置功能 --- api/continuity_report.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/continuity_report.go b/api/continuity_report.go index bc26731..9ed9660 100644 --- a/api/continuity_report.go +++ b/api/continuity_report.go @@ -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, "上报失败")