{"record":{"id":"4eeb166e485533ab","repo":"juanfont/headscale","slug":"getting-node-w","errorCode":null,"errorMessage":"getting node: %w","messagePattern":"getting node: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/headscale/cli/nodes.go","lineNumber":271,"sourceCode":"\t\tif resp.StatusCode() != http.StatusOK {\n\t\t\treturn apiError(resp.StatusCode(), resp.ApplicationproblemJSONDefault)\n\t\t}\n\n\t\treturn printOutput(cmd, resp.JSON200.Node, \"Node renamed\")\n\t}),\n}\n\nvar deleteNodeCmd = &cobra.Command{\n\tUse:     cmdDelete,\n\tShort:   \"Delete a node\",\n\tAliases: []string{aliasDel},\n\tRunE: clientRunE(func(ctx context.Context, client *clientv1.ClientWithResponses, cmd *cobra.Command, args []string) error {\n\t\tidentifier, _ := cmd.Flags().GetUint64(\"identifier\")\n\t\tnodeID := strconv.FormatUint(identifier, util.Base10)\n\n\t\tgetResponse, err := client.GetNodeWithResponse(ctx, nodeID)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"getting node: %w\", err)\n\t\t}\n\n\t\tif getResponse.StatusCode() != http.StatusOK {\n\t\t\treturn apiError(getResponse.StatusCode(), getResponse.ApplicationproblemJSONDefault)\n\t\t}\n\n\t\tif !confirmAction(cmd, fmt.Sprintf(\n\t\t\t\"Do you want to remove the node %s?\",\n\t\t\tgetResponse.JSON200.Node.Name,\n\t\t)) {\n\t\t\treturn printOutput(cmd, map[string]string{colResult: \"Node not deleted\"}, \"Node not deleted\")\n\t\t}\n\n\t\tdeleteResponse, err := client.DeleteNodeWithResponse(ctx, nodeID)\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"deleting node: %w\", err)\n\t\t}\n","sourceCodeStart":253,"sourceCodeEnd":289,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/cmd/headscale/cli/nodes.go#L253-L289","documentation":"Error \"getting node: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at cmd/headscale/cli/nodes.go:271 when the library encounters an invalid state.","commonSituations":"Fetching the node failed. Verify the node identifier (ID) is correct via headscale nodes list.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (getting node); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (getting node); 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"}