From 0e77a212b1985988ba6b21229533449b9cbb82f0 Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Thu, 18 Jun 2026 14:31:19 +0000 Subject: [PATCH] hscontrol/api: wrap the register user-lookup error as 'looking up user' Matches the wording the CLI auth-validation test expects (and the previous handler used); still a 404. --- hscontrol/api/v1/nodes.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hscontrol/api/v1/nodes.go b/hscontrol/api/v1/nodes.go index ceb87163..8ea581b8 100644 --- a/hscontrol/api/v1/nodes.go +++ b/hscontrol/api/v1/nodes.go @@ -3,6 +3,7 @@ package apiv1 import ( "cmp" "context" + "fmt" "net/netip" "slices" "time" @@ -29,7 +30,7 @@ func (s *Server) RegisterNode( user, err := s.state.GetUserByName(params.User.Or("")) if err != nil { - return nil, mapStateError(err) + return nil, mapStateError(fmt.Errorf("looking up user: %w", err)) } node, nodeChange, err := s.state.HandleNodeFromAuthPath(