{"record":{"id":"ce16e0470b40f0e0","repo":"juanfont/headscale","slug":"deleting-node-w","errorCode":null,"errorMessage":"deleting node: %w","messagePattern":"deleting node: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/headscale/cli/nodes.go","lineNumber":287,"sourceCode":"\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\n\t\tif deleteResponse.StatusCode() != http.StatusOK {\n\t\t\treturn apiError(deleteResponse.StatusCode(), deleteResponse.ApplicationproblemJSONDefault)\n\t\t}\n\n\t\treturn printOutput(\n\t\t\tcmd,\n\t\t\tmap[string]string{colResult: \"Node deleted\"},\n\t\t\t\"Node deleted\",\n\t\t)\n\t}),\n}\n\nvar backfillNodeIPsCmd = &cobra.Command{\n\tUse:   \"backfillips\",\n\tShort: \"Backfill IPs missing from nodes\",\n\tLong: `","sourceCodeStart":269,"sourceCodeEnd":305,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/cmd/headscale/cli/nodes.go#L269-L305","documentation":"Error \"deleting node: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at cmd/headscale/cli/nodes.go:287 when the library encounters an invalid state.","commonSituations":"Deleting the node failed. Verify the node exists and the CLI has a valid connection and credentials to the server.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (deleting 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 (deleting 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"}