juanfont/headscale · error
listing nodes: %w
Error message
listing nodes: %w
What it means
Error "listing nodes: %w" thrown in juanfont/headscale.
Source
Thrown at cmd/headscale/cli/nodes.go:112
)
}),
}
var listNodesCmd = &cobra.Command{
Use: cmdList,
Short: "List nodes",
Aliases: []string{"ls", cmdShow},
RunE: clientRunE(func(ctx context.Context, client *clientv1.ClientWithResponses, cmd *cobra.Command, args []string) error {
user, _ := cmd.Flags().GetString("user")
params := &clientv1.ListNodesParams{}
if user != "" {
params.User = &user
}
resp, err := client.ListNodesWithResponse(ctx, params)
if err != nil {
return fmt.Errorf("listing nodes: %w", err)
}
if resp.StatusCode() != http.StatusOK {
return apiError(resp.StatusCode(), resp.ApplicationproblemJSONDefault)
}
nodes := resp.JSON200.Nodes
return printListOutput(cmd, nodes, func() error {
tableData, err := nodesToPtables(nodes)
if err != nil {
return fmt.Errorf("converting to table: %w", err)
}
return pterm.DefaultTable.WithHasHeader().WithData(tableData).Render()
})
}),
}View on GitHub (pinned to 565fd254d0)
Solutions
- Inspect the wrapped error for the underlying cause and correct the failing condition (listing nodes); retry the operation after fixing the input, configuration, or environment.
Example fix
Inspect the wrapped error for the underlying cause and correct the failing condition (listing nodes); retry the operation after fixing the input, configuration, or environment.
When it happens
Trigger: Thrown at cmd/headscale/cli/nodes.go:112 when the library encounters an invalid state.
Common situations: The gRPC ListNodes call failed. Check connectivity to the headscale server and that the CLI API key or socket credentials are valid.
AI-assisted analysis of juanfont/headscale@565fd254d0 (2026-08-15).
Data as JSON: /api/errors/e9462ee5f5ef919d.
Report an issue: GitHub.