{"record":{"id":"f36f92e8ee8142ac","repo":"juanfont/headscale","slug":"converting-to-table-w","errorCode":null,"errorMessage":"converting to table: %w","messagePattern":"converting to table: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/headscale/cli/nodes.go","lineNumber":124,"sourceCode":"\t\tif user != \"\" {\n\t\t\tparams.User = &user\n\t\t}\n\n\t\tresp, err := client.ListNodesWithResponse(ctx, params)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"listing nodes: %w\", err)\n\t\t}\n\n\t\tif resp.StatusCode() != http.StatusOK {\n\t\t\treturn apiError(resp.StatusCode(), resp.ApplicationproblemJSONDefault)\n\t\t}\n\n\t\tnodes := resp.JSON200.Nodes\n\n\t\treturn printListOutput(cmd, nodes, func() error {\n\t\t\ttableData, err := nodesToPtables(nodes)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"converting to table: %w\", err)\n\t\t\t}\n\n\t\t\treturn pterm.DefaultTable.WithHasHeader().WithData(tableData).Render()\n\t\t})\n\t}),\n}\n\nvar listNodeRoutesCmd = &cobra.Command{\n\tUse:     \"list-routes\",\n\tShort:   \"List routes available on nodes\",\n\tAliases: []string{\"lsr\", \"routes\"},\n\tRunE: clientRunE(func(ctx context.Context, client *clientv1.ClientWithResponses, cmd *cobra.Command, args []string) error {\n\t\tidentifier, _ := cmd.Flags().GetUint64(\"identifier\")\n\n\t\tresp, err := client.ListNodesWithResponse(ctx, &clientv1.ListNodesParams{})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"listing nodes: %w\", err)\n\t\t}","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/cmd/headscale/cli/nodes.go#L106-L142","documentation":"Error \"converting to table: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at cmd/headscale/cli/nodes.go:124 when the library encounters an invalid state.","commonSituations":"Converting the node list into table output failed. This typically follows an unexpected field in the server response; ensure CLI and server versions match.","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."],"exampleFix":"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.","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"565fd254d06c4c7f9a8cad1714a43445c79ba420","analyzedAt":"2026-08-15T13:12:30.133Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}