Merge remote-tracking branch 'origin/errcode' into errcode

This commit is contained in:
Gordon
2023-03-15 11:09:31 +08:00
3 changed files with 17 additions and 19 deletions
-3
View File
@@ -2,7 +2,6 @@ package a2r
import (
"OpenIM/internal/apiresp"
"OpenIM/pkg/common/log"
"OpenIM/pkg/errs"
"context"
"github.com/gin-gonic/gin"
@@ -27,13 +26,11 @@ 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连接失败
return
}
data, err := rpc(cli, c, &req)
if err != nil {
log.ZError(c, "rpc call failed", err)
apiresp.GinError(c, err) // RPC调用失败
return
}