This commit is contained in:
邹宗楠
2025-06-24 13:50:29 +08:00
parent 5b3ef2cd6d
commit 0599a21bce
42 changed files with 4192 additions and 26 deletions

View File

@@ -141,11 +141,16 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http.
continue
}
}
if bodyData, err := ioutil.ReadAll(response.Body); err == nil {
bodyData, err := ioutil.ReadAll(response.Body)
if err == nil {
baseapi.SugarLogger.Debugf("AccessPlatformAPIWithRetry:%s HTTP code is:%d, url:%v, response:%s", trackInfo, response.StatusCode, request.URL, string(bodyData))
} else {
baseapi.SugarLogger.Debugf("AccessPlatformAPIWithRetry:%s ioutil.ReadAll failed, HTTP code is:%d, url:%v, error:%v", trackInfo, response.StatusCode, request.URL, err)
}
if bodyData != nil {
return errors.New(string(bodyData))
}
return ErrHTTPCodeIsNot200
}
var (