自定义错误
This commit is contained in:
parent
564a5b6d82
commit
e5291d07f4
|
|
@ -36,7 +36,7 @@ func (s *VoucherService) CmbOrder(ctx http.Context) error {
|
||||||
ThirdErrCode: se.Reason,
|
ThirdErrCode: se.Reason,
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Errorf("cmbOrder error: %v", err)
|
log.Errorf("cmbOrder: %v", err)
|
||||||
} else {
|
} else {
|
||||||
bizReply = &v1.CmbOrderReply{
|
bizReply = &v1.CmbOrderReply{
|
||||||
RespCode: vo.CmbResponseStatusSuccess.GetValue(),
|
RespCode: vo.CmbResponseStatusSuccess.GetValue(),
|
||||||
|
|
@ -54,7 +54,7 @@ func (s *VoucherService) CmbOrder(ctx http.Context) error {
|
||||||
|
|
||||||
reply, err = s.CmbMixRepo.GetResponse(ctx, xx)
|
reply, err = s.CmbMixRepo.GetResponse(ctx, xx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("CmbOrder GetResponse error: %v", err)
|
log.Errorf("CmbOrder GetResponse: %v", err)
|
||||||
return ctx.JSON(400, err)
|
return ctx.JSON(400, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -120,7 +120,7 @@ func (s *VoucherService) CmbQuery(ctx http.Context) error {
|
||||||
req.RespMsg = err.Error()
|
req.RespMsg = err.Error()
|
||||||
req.BizContent = ""
|
req.BizContent = ""
|
||||||
|
|
||||||
log.Errorf("CmbQuery error: %v", err)
|
log.Errorf("CmbQuery: %v", err)
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
replyBizContentBytes, _ := json.Marshal(bizReply)
|
replyBizContentBytes, _ := json.Marshal(bizReply)
|
||||||
|
|
@ -132,7 +132,7 @@ func (s *VoucherService) CmbQuery(ctx http.Context) error {
|
||||||
|
|
||||||
reply, err = s.CmbMixRepo.GetResponse(ctx, req)
|
reply, err = s.CmbMixRepo.GetResponse(ctx, req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("cmbProductQuery GetResponse error: %v", err)
|
log.Errorf("cmbProductQuery GetResponse: %v", err)
|
||||||
return ctx.JSON(400, err)
|
return ctx.JSON(400, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -186,7 +186,7 @@ func (s *VoucherService) CmbProductQuery(ctx http.Context) error {
|
||||||
ThirdErrCode: se.Reason,
|
ThirdErrCode: se.Reason,
|
||||||
}
|
}
|
||||||
|
|
||||||
log.Errorf("cmbProductQuery error: %v", err)
|
log.Errorf("cmbProductQuery: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
replyBizContent, _ := json.Marshal(bizReply)
|
replyBizContent, _ := json.Marshal(bizReply)
|
||||||
|
|
@ -198,7 +198,7 @@ func (s *VoucherService) CmbProductQuery(ctx http.Context) error {
|
||||||
|
|
||||||
reply, err = s.CmbMixRepo.GetResponse(ctx, xx)
|
reply, err = s.CmbMixRepo.GetResponse(ctx, xx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Errorf("cmbProductQuery GetResponse error: %v", err)
|
log.Errorf("cmbProductQuery GetResponse: %v", err)
|
||||||
return ctx.JSON(400, err)
|
return ctx.JSON(400, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue