mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-10 13:09:51 +08:00
Merge remote-tracking branch 'origin/errcode' into errcode
This commit is contained in:
commit
18c4212aa0
@ -115,11 +115,12 @@ func (s *groupServer) Run() {
|
|||||||
log.NewInfo("", "group rpc success")
|
log.NewInfo("", "group rpc success")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (resp *pbGroup.CreateGroupResp, _ error) {
|
func (s *groupServer) CreateGroup(ctx context.Context, req *pbGroup.CreateGroupReq) (resp *pbGroup.CreateGroupResp, err error) {
|
||||||
resp = &pbGroup.CreateGroupResp{CommonResp: &open_im_sdk.CommonResp{}}
|
resp = &pbGroup.CreateGroupResp{CommonResp: &open_im_sdk.CommonResp{}}
|
||||||
ctx = trace_log.NewRpcCtx(ctx, utils.GetSelfFuncName(), req.OperationID)
|
ctx = trace_log.NewRpcCtx(ctx, utils.GetSelfFuncName(), req.OperationID)
|
||||||
trace_log.SetContextInfo(ctx, utils.GetSelfFuncName(), nil, "req", req, "resp", resp)
|
trace_log.SetContextInfo(ctx, utils.GetSelfFuncName(), err, "req", req.String(), "resp", resp.String())
|
||||||
defer trace_log.ShowLog(ctx)
|
defer trace_log.ShowLog(ctx)
|
||||||
|
|
||||||
if err := token_verify.CheckAccessV2(ctx, req.OpUserID, req.OwnerUserID); err != nil {
|
if err := token_verify.CheckAccessV2(ctx, req.OpUserID, req.OwnerUserID); err != nil {
|
||||||
SetErrorForResp(err, &resp.CommonResp.ErrCode, &resp.CommonResp.ErrMsg)
|
SetErrorForResp(err, &resp.CommonResp.ErrCode, &resp.CommonResp.ErrMsg)
|
||||||
return
|
return
|
||||||
@ -791,11 +792,9 @@ func SetErrorForResp(err error, errCode *int32, errMsg *string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup.GetGroupApplicationListReq) (resp *pbGroup.GetGroupApplicationListResp, err error) {
|
func (s *groupServer) GetGroupApplicationList(ctx context.Context, req *pbGroup.GetGroupApplicationListReq) (resp *pbGroup.GetGroupApplicationListResp, err error) {
|
||||||
defer func() {
|
|
||||||
trace_log.SetContextInfo(ctx, utils.GetSelfFuncName(), err, "rpc req ", req.String(), "rpc resp ", resp.String())
|
|
||||||
trace_log.ShowLog(ctx)
|
|
||||||
}()
|
|
||||||
ctx = trace_log.NewRpcCtx(ctx, utils.GetSelfFuncName(), req.OperationID)
|
ctx = trace_log.NewRpcCtx(ctx, utils.GetSelfFuncName(), req.OperationID)
|
||||||
|
trace_log.SetContextInfo(ctx, utils.GetSelfFuncName(), err, "rpc req ", req.String(), "rpc resp ", resp.String())
|
||||||
|
trace_log.ShowLog(ctx)
|
||||||
|
|
||||||
resp = &pbGroup.GetGroupApplicationListResp{CommonResp: &open_im_sdk.CommonResp{}}
|
resp = &pbGroup.GetGroupApplicationListResp{CommonResp: &open_im_sdk.CommonResp{}}
|
||||||
reply, err := imdb.GetRecvGroupApplicationList(req.FromUserID)
|
reply, err := imdb.GetRecvGroupApplicationList(req.FromUserID)
|
||||||
|
@ -3,7 +3,6 @@ package trace_log
|
|||||||
import (
|
import (
|
||||||
"Open_IM/pkg/common/constant"
|
"Open_IM/pkg/common/constant"
|
||||||
"Open_IM/pkg/common/log"
|
"Open_IM/pkg/common/log"
|
||||||
"Open_IM/pkg/utils"
|
|
||||||
"context"
|
"context"
|
||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
@ -77,7 +76,7 @@ func SetContextInfo(ctx context.Context, funcName string, err error, args ...int
|
|||||||
var funcInfo FuncInfo
|
var funcInfo FuncInfo
|
||||||
funcInfo.Args = make(map[string]interface{})
|
funcInfo.Args = make(map[string]interface{})
|
||||||
argsHandle(args, funcInfo.Args)
|
argsHandle(args, funcInfo.Args)
|
||||||
funcInfo.FuncName = utils.GetSelfFuncName()
|
funcInfo.FuncName = funcName
|
||||||
funcInfo.Err = err
|
funcInfo.Err = err
|
||||||
*t.Funcs = append(*t.Funcs, funcInfo)
|
*t.Funcs = append(*t.Funcs, funcInfo)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user