From 19cd214b4f1c21d750207e9166746b25296178af Mon Sep 17 00:00:00 2001 From: zouap Date: Wed, 14 Sep 2022 11:12:11 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=89=93=E5=8D=B0=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: zouap --- modules/aisafety/resty.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/aisafety/resty.go b/modules/aisafety/resty.go index aff2e28fc..4ca133d89 100644 --- a/modules/aisafety/resty.go +++ b/modules/aisafety/resty.go @@ -204,12 +204,14 @@ func GetTaskStatus(jobID string) error { Get(HOST + "/v1/external/eval-standard/query?serialNo=" + jobID) log.Info("url=" + HOST + "/v1/external/eval-standard/query?serialNo=" + jobID) - if err != nil { - return fmt.Errorf("resty GetJob: %v", err) - } responseStr := string(res.Body()) log.Info("GetTaskStatus responseStr=" + responseStr + " res code=" + fmt.Sprint(res.StatusCode())) + if err != nil { + log.Info("error =" + err.Error()) + return fmt.Errorf("resty GetJob: %v", err) + } + return nil }