diff --git a/platformapi/jdapi/store_page.go b/platformapi/jdapi/store_page.go index be99493f..5a8e0da9 100644 --- a/platformapi/jdapi/store_page.go +++ b/platformapi/jdapi/store_page.go @@ -341,9 +341,17 @@ func (a *API) AccessStorePage2(fullURL string, params map[string]interface{}, is return platformapi.ErrLevelSuccess, nil } retVal = jsonResult1 + var errMsg string code, ok := jsonResult1["code"].(string) if !ok { - return platformapi.ErrLevelGeneralFail, utils.NewErrorCode(utils.Format4Output(jsonResult1, true), "999") + if statusMap, ok := jsonResult1["status"].(map[string]interface{}); !ok { + return platformapi.ErrLevelGeneralFail, utils.NewErrorCode(utils.Format4Output(jsonResult1, true), "999") + } else { + code = utils.Interface2String(statusMap["errorCode"]) + errMsg = utils.Interface2String(statusMap["message"]) + } + } else { + errMsg = utils.Interface2String(jsonResult1["msg"]) } if code == ResponseCodeSuccess { if resultKey != "" { @@ -351,7 +359,7 @@ func (a *API) AccessStorePage2(fullURL string, params map[string]interface{}, is } return platformapi.ErrLevelSuccess, nil } - newErr := utils.NewErrorCode(jsonResult1["msg"].(string), code) + newErr := utils.NewErrorCode(errMsg, code) if _, ok := pageExceedLimitCodes[code]; ok { return platformapi.ErrLevelExceedLimit, newErr } else if _, ok := pageCanRetryCodes[code]; ok {