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.
This commit is contained in:
Kristoffer Dalby
2026-06-18 14:31:19 +00:00
parent d0b39e7cbb
commit 0e77a212b1
+2 -1
View File
@@ -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(