mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-04 06:49:21 +08:00
api2rpc
This commit is contained in:
parent
08fdac83fc
commit
e513a09e45
@ -59,7 +59,7 @@ func rpcString(v interface{}) string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
type baseResp struct {
|
type baseResp struct {
|
||||||
ErrCode int `json:"errCode"`
|
ErrCode int32 `json:"errCode"`
|
||||||
ErrMsg string `json:"errMsg"`
|
ErrMsg string `json:"errMsg"`
|
||||||
ErrDtl string `json:"errDtl"`
|
ErrDtl string `json:"errDtl"`
|
||||||
Data interface{} `json:"data"`
|
Data interface{} `json:"data"`
|
||||||
|
@ -43,7 +43,7 @@ func (r *rpcCall[A, B, C, D, E]) Call(c *gin.Context, client func() (E, error))
|
|||||||
} else {
|
} else {
|
||||||
cerr, ok := err.(errs.Coderr)
|
cerr, ok := err.(errs.Coderr)
|
||||||
if ok {
|
if ok {
|
||||||
resp.ErrCode = cerr.Code()
|
resp.ErrCode = int32(cerr.Code())
|
||||||
resp.ErrMsg = cerr.Msg()
|
resp.ErrMsg = cerr.Msg()
|
||||||
resp.ErrDtl = cerr.Detail()
|
resp.ErrDtl = cerr.Detail()
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user