Skip to content

Commit

Permalink
chore: Adding some logging to debug agent
Browse files Browse the repository at this point in the history
  • Loading branch information
langecode committed Jan 26, 2024
1 parent e3f48fc commit b6b305a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion server/grpc/rpc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit b6b305a

Please sign in to comment.