juanfont/headscale · error
converting to table: %w
Error message
converting to table: %w
What it means
Error "converting to table: %w" thrown in juanfont/headscale.
Source
Thrown at cmd/headscale/cli/nodes.go:124
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()
})
}),
}
var listNodeRoutesCmd = &cobra.Command{
Use: "list-routes",
Short: "List routes available on nodes",
Aliases: []string{"lsr", "routes"},
RunE: clientRunE(func(ctx context.Context, client *clientv1.ClientWithResponses, cmd *cobra.Command, args []string) error {
identifier, _ := cmd.Flags().GetUint64("identifier")
resp, err := client.ListNodesWithResponse(ctx, &clientv1.ListNodesParams{})
if err != nil {
return fmt.Errorf("listing nodes: %w", err)
}View on GitHub (pinned to 565fd254d0)
Solutions
- Inspect the wrapped error for the underlying cause and correct the failing condition (converting to table); 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 (converting to table); retry the operation after fixing the input, configuration, or environment.
When it happens
Trigger: Thrown at cmd/headscale/cli/nodes.go:124 when the library encounters an invalid state.
Common situations: Converting the node list into table output failed. This typically follows an unexpected field in the server response; ensure CLI and server versions match.
AI-assisted analysis of juanfont/headscale@565fd254d0 (2026-08-15).
Data as JSON: /api/errors/f36f92e8ee8142ac.
Report an issue: GitHub.