Skip to content

Commit

Permalink
fix: consistent error return for 'agent not found', close #64
Browse files Browse the repository at this point in the history
  • Loading branch information
HilkopterBob committed Oct 8, 2024
1 parent cb6a1f7 commit d50046b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion handler/agentgroup.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ func GetAgentByID(c *fiber.Ctx) error {
}

logger.Logger.Warnf("Got Request for agent with id: %s, which dosn't exist!", urlIDString)
return c.Status(fiber.StatusNotFound).JSON(nil)
return c.Status(fiber.StatusNotFound).JSON(fiber.Map{
"error": "Agent not found",
})
}

// RegisterAgent handles POST requests to register a new agent.
Expand Down

0 comments on commit d50046b

Please sign in to comment.