From a4767bc7e3cd54cf0d14591d3b2b62bebd85d6d0 Mon Sep 17 00:00:00 2001 From: wangchuxiao Date: Tue, 30 Aug 2022 01:40:54 +0800 Subject: [PATCH] cms --- internal/rpc/user/user.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/internal/rpc/user/user.go b/internal/rpc/user/user.go index 56670eb72..7d82bb192 100644 --- a/internal/rpc/user/user.go +++ b/internal/rpc/user/user.go @@ -7,7 +7,6 @@ import ( "Open_IM/pkg/common/db" imdb "Open_IM/pkg/common/db/mysql_model/im_mysql_model" rocksCache "Open_IM/pkg/common/db/rocks_cache" - errors "Open_IM/pkg/common/http" "Open_IM/pkg/common/log" "Open_IM/pkg/common/token_verify" "Open_IM/pkg/grpc-etcdv3/getcdv3" @@ -697,7 +696,9 @@ func (s *userServer) GetBlockUsers(ctx context.Context, req *pbUser.GetBlockUser nums, err := imdb.GetBlockUsersNumCount() if err != nil { log.NewError(req.OperationID, utils.GetSelfFuncName(), "GetBlockUsersNumCount failed", err.Error()) - return resp, errors.WrapError(constant.ErrDB) + resp.CommonResp.ErrCode = constant.ErrDB.ErrCode + resp.CommonResp.ErrMsg = err.Error() + return resp, nil } resp.UserNums = nums log.NewInfo(req.OperationID, utils.GetSelfFuncName(), "resp: ", resp)