{"record":{"id":"69a422d9dd981f4a","repo":"juanfont/headscale","slug":"expiring-node-w","errorCode":null,"errorMessage":"expiring node: %w","messagePattern":"expiring node: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/headscale/cli/nodes.go","lineNumber":220,"sourceCode":"\n\t\tnow := time.Now()\n\n\t\texpiryTime := now\n\n\t\tif expiry != \"\" {\n\t\t\tvar err error\n\n\t\t\texpiryTime, err = time.Parse(time.RFC3339, expiry)\n\t\t\tif err != nil {\n\t\t\t\treturn fmt.Errorf(\"parsing expiry time: %w\", err)\n\t\t\t}\n\t\t}\n\n\t\tresp, err := client.ExpireNodeWithResponse(ctx, nodeID, clientv1.ExpireNodeJSONRequestBody{\n\t\t\tExpiry: &expiryTime,\n\t\t})\n\t\tif err != nil {\n\t\t\treturn fmt.Errorf(\"expiring node: %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\tnode := resp.JSON200.Node\n\n\t\tif now.Equal(expiryTime) || now.After(expiryTime) {\n\t\t\treturn printOutput(cmd, node, \"Node expired\")\n\t\t}\n\n\t\treturn printOutput(cmd, node, \"Node expiration updated\")\n\t}),\n}\n\nvar renameNodeCmd = &cobra.Command{\n\tUse:   \"rename NEW_NAME\",","sourceCodeStart":202,"sourceCodeEnd":238,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/cmd/headscale/cli/nodes.go#L202-L238","documentation":"Error \"expiring node: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at cmd/headscale/cli/nodes.go:220 when the library encounters an invalid state.","commonSituations":"The gRPC call to expire the node failed. Verify the node ID exists and the server is reachable.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (expiring 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 (expiring 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-15T22:17:37.221Z"}