mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-04-06 04:15:46 +08:00
add log
This commit is contained in:
parent
7a248377f0
commit
abc303d1b3
@ -2,6 +2,7 @@ package a2r
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"OpenIM/internal/apiresp"
|
"OpenIM/internal/apiresp"
|
||||||
|
"OpenIM/pkg/common/log"
|
||||||
"OpenIM/pkg/errs"
|
"OpenIM/pkg/errs"
|
||||||
"context"
|
"context"
|
||||||
"github.com/gin-gonic/gin"
|
"github.com/gin-gonic/gin"
|
||||||
@ -27,10 +28,12 @@ func Call[A, B, C any](
|
|||||||
cli, err := client()
|
cli, err := client()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
apiresp.GinError(c, errs.ErrInternalServer.Wrap(err.Error())) // 获取RPC连接失败
|
apiresp.GinError(c, errs.ErrInternalServer.Wrap(err.Error())) // 获取RPC连接失败
|
||||||
|
log.Error("0", "get rpc client conn err:", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
data, err := rpc(cli, c, &req)
|
data, err := rpc(cli, c, &req)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
log.Error("0", "rpc call err:", err.Error())
|
||||||
apiresp.GinError(c, err) // RPC调用失败
|
apiresp.GinError(c, err) // RPC调用失败
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user