test-errcode
wangchuxiao 2 years ago
parent dffc8da28f
commit 845f858e7a

@ -27,13 +27,13 @@ func Call[A, B, C any](
}
cli, err := client()
if err != nil {
log.ZError(c, "get rpc client conn failed", err)
apiresp.GinError(c, errs.ErrInternalServer.Wrap(err.Error())) // 获取RPC连接失败
log.Error("0", "get rpc client conn err:", err.Error())
return
}
data, err := rpc(cli, c, &req)
if err != nil {
log.Error("0", "rpc call err:", err.Error())
log.ZError(c, "rpc call failed", err)
apiresp.GinError(c, err) // RPC调用失败
return
}

Loading…
Cancel
Save