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 }