- 饿百20502重试

This commit is contained in:
gazebo
2019-05-05 18:16:00 +08:00
parent b54ef05d4f
commit 2e0b9206b8

View File

@@ -124,7 +124,7 @@ func (a *API) AccessAPI(cmd string, body map[string]interface{}) (retVal *Respon
baseapi.SugarLogger.Debugf("ebai AccessAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
newErr := utils.NewErrorIntCode(retVal.Error, retVal.ErrNo)
// todo 临时处理超过阈值错...
if newErr.IntCode() == 20501 && strings.Index(retVal.Error, "阈值") >= 0 {
if (newErr.IntCode() == 20501 && strings.Index(retVal.Error, "阈值") >= 0) || (newErr.IntCode() == 20502 && strings.Index(retVal.Error, "系统繁忙") >= 0) {
return platformapi.ErrLevelExceedLimit, newErr
}
return platformapi.ErrLevelCodeIsNotOK, newErr