- business msg added to error

This commit is contained in:
gazebo
2018-06-20 07:34:11 +08:00
parent 6fc94315f4
commit 7785ef6485
5 changed files with 6 additions and 2 deletions

View File

@@ -66,6 +66,7 @@ func (j *JDAPI) CheckRequestValidation(request *http.Request) (callbackResponse
sign := j.signParams(mapData)
if sign != request.FormValue(signKey) {
j.sugarLogger.Infof("Signature is not ok, mine:%v, get:%v", sign, request.FormValue(signKey))
return &JDCallbackResponse{
Code: JDerrorCodeInvalidSign,
Msg: "signature is invalid",

View File

@@ -190,7 +190,7 @@ func (j *JDAPI) AccessJDQuery(apiStr string, jdParams map[string]string) (retVal
} else if _, ok := canRetryCodes[code]; ok {
return common.PAErrorLevelRecoverable, nil
} else {
return code, nil
return common.PAErrorLevelGeneralFail, utils.NewErrorCode(jsonResult1["msg"].(string), code)
}
})