mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-10 03:56:00 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@ func (o *Conversation) client() (conversation.ConversationClient, error) {
|
||||
}
|
||||
|
||||
func (o *Conversation) GetAllConversations(c *gin.Context) {
|
||||
return
|
||||
a2r.Call(conversation.ConversationClient.GetAllConversations, o.client, c)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user