- more log.
This commit is contained in:
@@ -62,6 +62,7 @@ type payload struct {
|
||||
}
|
||||
|
||||
func New(token, appKey, secret string, isProd bool, config ...*platformapi.APIConfig) *API {
|
||||
baseapi.SugarLogger.Debugf("token=%v, appKey=%v, secret=%v", token, appKey, secret)
|
||||
curConfig := platformapi.DefAPIConfig
|
||||
if len(config) > 0 {
|
||||
curConfig = *config[0]
|
||||
@@ -175,7 +176,7 @@ func (a *API) AccessAPI(action string, params map[string]interface{}) (retVal *R
|
||||
return platformapi.ErrLevelSuccess, nil
|
||||
}
|
||||
code := errinfoMap["code"].(string)
|
||||
baseapi.SugarLogger.Warnf("response business code is not ok, data:%v, code:%v", jsonResult1, code)
|
||||
baseapi.SugarLogger.Warnf("response business code is not ok, data:%v, code:%v, payload:%v", jsonResult1, code, pl)
|
||||
newErr := utils.NewErrorCode(errinfoMap["message"].(string), code)
|
||||
if code == "EXCEED_LIMIT" {
|
||||
return platformapi.ErrLevelExceedLimit, newErr
|
||||
|
||||
Reference in New Issue
Block a user