Browse Source

get real error_msg

tags/v1.21.8^2
lewis 4 years ago
parent
commit
aff44cdf9d
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      modules/cloudbrain/resty.go

+ 6
- 0
modules/cloudbrain/resty.go View File

@@ -82,6 +82,12 @@ sendjob:
Post(HOST + "/rest-server/api/v1/jobs/")

if err != nil {
if res != nil {
var response models.CloudBrainResult
json.Unmarshal(res.Body(), &response)
log.Error("code(%s), msg(%s)", response.Code, response.Msg)
return nil, fmt.Errorf(response.Msg)
}
return nil, fmt.Errorf("resty create job: %s", err)
}



Loading…
Cancel
Save