diff --git a/modules/gateway/agentmgr_comp.go b/modules/gateway/agentmgr_comp.go index 1ca3046ee..e69b3f7b1 100644 --- a/modules/gateway/agentmgr_comp.go +++ b/modules/gateway/agentmgr_comp.go @@ -39,7 +39,7 @@ func (this *AgentMgr_Comp) Bind(ctx context.Context, args *pb.AgentBuildReq, rep a.(IAgent).Bind(args.UserId, args.WorkerId) } else { reply.Code = pb.ErrorCode_UserSessionNobeing - reply.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing) + reply.Message = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing) } return nil } @@ -50,7 +50,7 @@ func (this *AgentMgr_Comp) UnBind(ctx context.Context, args *pb.AgentUnBuildReq, a.(IAgent).UnBind() } else { reply.Code = pb.ErrorCode_UserSessionNobeing - reply.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing) + reply.Message = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing) } return nil } @@ -65,7 +65,7 @@ func (this *AgentMgr_Comp) SendMsgToAgent(ctx context.Context, args *pb.AgentSen }) } else { reply.Code = pb.ErrorCode_UserSessionNobeing - reply.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing) + reply.Message = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing) } return nil } @@ -105,7 +105,7 @@ func (this *AgentMgr_Comp) CloseAgent(ctx context.Context, args *pb.AgentCloseeR a.(IAgent).Close() } else { reply.Code = pb.ErrorCode_UserSessionNobeing - reply.Msg = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing) + reply.Message = pb.GetErrorCodeMsg(pb.ErrorCode_UserSessionNobeing) } return nil } diff --git a/services/comp_gateroute.go b/services/comp_gateroute.go index cd6526cda..d6faea977 100644 --- a/services/comp_gateroute.go +++ b/services/comp_gateroute.go @@ -135,6 +135,7 @@ func (this *SComp_GateRouteComp) ReceiveMsg(ctx context.Context, args *pb.AgentM if code.Code != pb.ErrorCode_Success { log.Errorf("HandleUserMsg:%s msg:%v code:%d", args.Method, msg, code) reply.Code = code.Code + reply.Message = pb.GetErrorCodeMsg(code.Code) if code.Data != nil { if d, err := jsoniter.Marshal(code.Data); err != nil { log.Errorf("HandleUserMsg:%s msg:%v code:%d err:%v", args.Method, msg, code, err) @@ -151,6 +152,7 @@ func (this *SComp_GateRouteComp) ReceiveMsg(ctx context.Context, args *pb.AgentM if errcode != pb.ErrorCode_Success { log.Errorf("HandleUserMsg:%s msg:%v code:%d", args.Method, msg, code) reply.Code = errcode + reply.Message = pb.GetErrorCodeMsg(errcode) return nil } } else {