fk
This commit is contained in:
@@ -178,13 +178,15 @@ func (a *API) AccessAPI2(cmd string, isGet bool, bizParams map[string]interface{
|
||||
if errObj, ok := jsonResult1["error"]; ok {
|
||||
baseapi.SugarLogger.Debugf("mtwm AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
|
||||
errorInfo := errObj.(map[string]interface{})
|
||||
newErr := utils.NewErrorIntCode(errorInfo["msg"].(string), int(utils.MustInterface2Int64(errorInfo["code"])))
|
||||
if canRetryCodes[newErr.IntCode()] == 1 {
|
||||
errCode := int(utils.MustInterface2Int64(errorInfo["code"]))
|
||||
newErr := utils.NewErrorIntCode(errorInfo["msg"].(string), errCode)
|
||||
if canRetryCodes[errCode] == 1 {
|
||||
return platformapi.ErrLevelExceedLimit, newErr
|
||||
} else if canRecoverCodes[newErr.IntCode()] == 1 {
|
||||
} else if canRecoverCodes[errCode] == 1 {
|
||||
return platformapi.ErrLevelRecoverableErr, newErr
|
||||
} else if errCode != 0 {
|
||||
return platformapi.ErrLevelCodeIsNotOK, newErr
|
||||
}
|
||||
return platformapi.ErrLevelCodeIsNotOK, newErr
|
||||
}
|
||||
return platformapi.ErrLevelSuccess, nil
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user