- more error and warn output.
This commit is contained in:
@@ -49,7 +49,7 @@ func (a *API) CheckCallbackValidation(request *http.Request) (callbackResponse *
|
||||
|
||||
for _, valueKey := range []string{"delivery_id", "mt_peisong_id", "order_id"} {
|
||||
if request.FormValue(valueKey) == "" {
|
||||
baseapi.SugarLogger.Errorf("Missing mandatory param:%v", valueKey)
|
||||
baseapi.SugarLogger.Errorf("Missing mandatory param PostForm:%v, valueKey:%v", request.PostForm, valueKey)
|
||||
return &CallbackResponse{
|
||||
Code: -1,
|
||||
}
|
||||
|
||||
@@ -86,13 +86,13 @@ func AccessPlatformAPIWithRetry(client *http.Client, request *http.Request, conf
|
||||
if ok && err.Timeout() && recoverableErrorRetryCount <= config.MaxRecoverableRetryCount {
|
||||
continue
|
||||
} else {
|
||||
baseapi.SugarLogger.Errorf("access api error:%v", err)
|
||||
baseapi.SugarLogger.Errorf("access api error:%v, request:%v", err, request)
|
||||
return ErrAPIAccessFailed
|
||||
}
|
||||
}
|
||||
defer response.Body.Close()
|
||||
if response.StatusCode != 200 {
|
||||
baseapi.SugarLogger.Errorf("HTTP code not 200, it's:%v", response.StatusCode)
|
||||
baseapi.SugarLogger.Errorf("HTTP code not 200, it's:%v, request:%v", response.StatusCode, request)
|
||||
return ErrHTTPCodeIsNot200
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user