- use Infof instead of Errorf when http code is not 200 (to avoid many ebai errors)
This commit is contained in:
@@ -125,7 +125,7 @@ func AccessPlatformAPIWithRetry(client *http.Client, handleRequest func() *http.
|
||||
defer response.Body.Close()
|
||||
if response.StatusCode != 200 {
|
||||
if bodyData, err := ioutil.ReadAll(response.Body); err == nil {
|
||||
baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s HTTP code is:%d, url:%v, request:%v, response:%s", trackID, response.StatusCode, request.URL, getClonedData(request.URL, savedBuf), string(bodyData))
|
||||
baseapi.SugarLogger.Infof("AccessPlatformAPIWithRetry:%s HTTP code is:%d, url:%v, request:%v, response:%s", trackID, response.StatusCode, request.URL, getClonedData(request.URL, savedBuf), string(bodyData))
|
||||
} else {
|
||||
baseapi.SugarLogger.Errorf("AccessPlatformAPIWithRetry:%s HTTP code is:%d, url:%v, request:%v", trackID, response.StatusCode, request.URL, getClonedData(request.URL, savedBuf))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user