银豹错误处理

This commit is contained in:
苏尹岚
2020-03-26 10:37:51 +08:00
parent e8841976d8
commit 4c745c648f

View File

@@ -32,10 +32,12 @@ func (a *API) AccessStorePage(action string, bizParams map[string]interface{}) (
return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil") return platformapi.ErrLevelRecoverableErr, fmt.Errorf("mapData is nil")
} }
if err == nil { if err == nil {
if !jsonResult1["successed"].(bool) { if jsonResult1["successed"] != nil {
errLevel = platformapi.ErrLevelGeneralFail if !jsonResult1["successed"].(bool) {
err = utils.NewErrorCode(jsonResult1["msg"].(string), "-1", 0) errLevel = platformapi.ErrLevelGeneralFail
baseapi.SugarLogger.Debugf("yinbao AccessStorePageAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true)) err = utils.NewErrorCode(jsonResult1["msg"].(string), "-1", 0)
baseapi.SugarLogger.Debugf("yinbao AccessStorePageAPI failed, jsonResult1:%s", utils.Format4Output(jsonResult1, true))
}
} }
retVal = jsonResult1 retVal = jsonResult1
} }