- handle 您的请求数已超过阈值 for ebaiapi
This commit is contained in:
@@ -121,10 +121,10 @@ 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() == 20212 {
|
||||
// return platformapi.ErrLevelExceedLimit, newErr
|
||||
// }
|
||||
// todo 临时处理超过阈值错...
|
||||
if newErr.IntCode() == 20501 && strings.Index(retVal.Error, "阈值") >= 0 {
|
||||
return platformapi.ErrLevelExceedLimit, newErr
|
||||
}
|
||||
return platformapi.ErrLevelCodeIsNotOK, newErr
|
||||
})
|
||||
return retVal, err
|
||||
|
||||
@@ -13,10 +13,6 @@ const (
|
||||
prodURL = "https://api.weixin.qq.com"
|
||||
)
|
||||
|
||||
const (
|
||||
actionGetToken = "token"
|
||||
)
|
||||
|
||||
const (
|
||||
ResponseCodeBusy = -1
|
||||
ResponseCodeSuccess = 0
|
||||
|
||||
Reference in New Issue
Block a user