mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-06-04 06:49:21 +08:00
Error code standardization
This commit is contained in:
parent
efd5da9e87
commit
84df63e249
@ -2,6 +2,7 @@ package common
|
||||
|
||||
import (
|
||||
"Open_IM/internal/fault_tolerant"
|
||||
"Open_IM/pkg/common/constant"
|
||||
"Open_IM/pkg/common/trace_log"
|
||||
"context"
|
||||
utils "github.com/OpenIMSDK/open_utils"
|
||||
@ -71,7 +72,7 @@ func ApiToRpc(c *gin.Context, apiReq, apiResp interface{}, rpcName string, fn in
|
||||
errMsgVal := commonResp.FieldByName("ErrMsg").Interface().(string)
|
||||
errCode := errCodeVal.Interface().(int32)
|
||||
if errCode != 0 {
|
||||
trace_log.WriteErrorResponse(nCtx, "RpcErrCode", &api_struct.ErrInfo{
|
||||
trace_log.WriteErrorResponse(nCtx, "RpcErrCode", &constant.ErrInfo{
|
||||
ErrCode: errCode,
|
||||
ErrMsg: errMsgVal,
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user