- return result even error in dada api
This commit is contained in:
@@ -18,11 +18,13 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
ResponseCodeException = -1
|
||||
ResponseCodeSuccess = 0
|
||||
ResponseCodeSignErr = 2003
|
||||
ResponseCodeRetryLater = 2012
|
||||
ResponseCodeNetworkErr = 2455
|
||||
ResponseCodeException = -1
|
||||
ResponseCodeSuccess = 0
|
||||
ResponseCodeSignErr = 2003
|
||||
ResponseCodeRetryLater = 2012
|
||||
ResponseCodeShopNotExist = 2402
|
||||
ResponseCodeShopAlreadyExist = 2403
|
||||
ResponseCodeNetworkErr = 2455
|
||||
)
|
||||
|
||||
type API struct {
|
||||
@@ -124,8 +126,8 @@ func (a *API) AccessAPI(action string, params interface{}) (retVal *ResponseResu
|
||||
Msg: jsonResult1["msg"].(string),
|
||||
Status: jsonResult1["status"].(string),
|
||||
}
|
||||
retVal.Result = jsonResult1["result"]
|
||||
if code == ResponseCodeSuccess {
|
||||
retVal.Result = jsonResult1["result"]
|
||||
return platformapi.ErrLevelSuccess, nil
|
||||
}
|
||||
newErr := utils.NewErrorIntCode(retVal.Msg, code)
|
||||
|
||||
Reference in New Issue
Block a user