From b6b305ab974f78fc659dfb2e4962c89c6c5accbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thor=20Anker=20Kvisg=C3=A5rd=20Lange?= Date: Fri, 26 Jan 2024 13:00:24 +0100 Subject: [PATCH] chore: Adding some logging to debug agent --- server/grpc/rpc.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/server/grpc/rpc.go b/server/grpc/rpc.go index a37c72d5bf..436926bc48 100644 --- a/server/grpc/rpc.go +++ b/server/grpc/rpc.go @@ -359,6 +359,7 @@ func (s *RPC) RegisterAgent(ctx context.Context, platform, backend, version stri err = s.store.AgentUpdate(agent) if err != nil { + log.Error().Err(err).Msg("unable to update agent") return -1, err } @@ -460,7 +461,9 @@ func (s *RPC) getAgentFromContext(ctx context.Context) (*model.Agent, error) { return nil, errors.New("agent_id is not a valid integer") } - return s.store.AgentFind(agentID) + ag, err := s.store.AgentFind(agentID) + log.Error().Err(err).Msg("Unable to get agent") + return ag, err } func (s *RPC) getHostnameFromContext(ctx context.Context) (string, error) {