- business msg added to error
This commit is contained in:
@@ -49,6 +49,7 @@ func (e *ELMAPI) unmarshalData(data []byte, msg interface{}) (callbackResponse *
|
||||
func (e *ELMAPI) CheckRequestValidation(mapData map[string]interface{}) (callbackResponse *ELMCallbackResponse) {
|
||||
sign := e.signParamsMap(mapData, "")
|
||||
if sign != mapData[signKey].(string) {
|
||||
e.sugarLogger.Infof("Signature is not ok, mine:%v, get:%v", sign, mapData[signKey].(string))
|
||||
return &ELMCallbackResponse{Message: "signature is invalid"}
|
||||
}
|
||||
return nil
|
||||
|
||||
@@ -153,7 +153,7 @@ func (e *ELMAPI) AccessELM(action string, params map[string]interface{}) (retVal
|
||||
} else if errCode == "SERVER_ERROR" || errCode == "BIZ_SYSTEM_ERROR" || errCode == "BIZ_1006" || errCode == "BUSINESS_ERROR" {
|
||||
return common.PAErrorLevelRecoverable, nil
|
||||
} else {
|
||||
return errCode, nil
|
||||
return common.PAErrorLevelGeneralFail, utils.NewErrorCode(errinfoMap["message"].(string), errCode)
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user