mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-05 09:36:00 +08:00
log
This commit is contained in:
@@ -15,7 +15,6 @@ func Call[A, B, C any](
|
||||
client func(ctx context.Context) (C, error),
|
||||
c *gin.Context,
|
||||
) {
|
||||
log.ZDebug(c, "before bind")
|
||||
var req A
|
||||
if err := c.BindJSON(&req); err != nil {
|
||||
log.ZWarn(c, "gin bind json error", err, "req", req)
|
||||
@@ -29,14 +28,12 @@ func Call[A, B, C any](
|
||||
return
|
||||
}
|
||||
}
|
||||
log.ZDebug(c, "before get grpc conn")
|
||||
cli, err := client(c)
|
||||
if err != nil {
|
||||
log.ZError(c, "get conn error", err, "req", req)
|
||||
apiresp.GinError(c, errs.ErrInternalServer.Wrap(err.Error())) // 获取RPC连接失败
|
||||
return
|
||||
}
|
||||
log.ZDebug(c, "before call rpc")
|
||||
data, err := rpc(cli, c, &req)
|
||||
if err != nil {
|
||||
log.ZError(c, "rpc call error", err, "req", req)
|
||||
|
||||
Reference in New Issue
Block a user