mirror of
https://github.com/juanfont/headscale.git
synced 2026-08-07 07:48:44 +09:00
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:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user