{"record":{"id":"e7eeaee9b5f4734a","repo":"juanfont/headscale","slug":"parsing-expiry-time-w","errorCode":null,"errorMessage":"parsing expiry time: %w","messagePattern":"parsing expiry time: %w","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cmd/headscale/cli/nodes.go","lineNumber":212,"sourceCode":"\t\t\tif resp.StatusCode() != http.StatusOK {\n\t\t\t\treturn apiError(resp.StatusCode(), resp.ApplicationproblemJSONDefault)\n\t\t\t}\n\n\t\t\treturn printOutput(cmd, resp.JSON200.Node, \"Node expiry disabled\")\n\t\t}\n\n\t\texpiry, _ := cmd.Flags().GetString(\"expiry\")\n\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\")","sourceCodeStart":194,"sourceCodeEnd":230,"githubUrl":"https://github.com/juanfont/headscale/blob/565fd254d06c4c7f9a8cad1714a43445c79ba420/cmd/headscale/cli/nodes.go#L194-L230","documentation":"Error \"parsing expiry time: %w\" thrown in juanfont/headscale.","triggerScenarios":"Thrown at cmd/headscale/cli/nodes.go:212 when the library encounters an invalid state.","commonSituations":"The --expiry value could not be parsed as a time. Use RFC3339 format (e.g. 2026-01-02T15:04:05Z) for the expiry flag.","solutions":["Inspect the wrapped error for the underlying cause and correct the failing condition (parsing expiry time); retry the operation after fixing the input, configuration, or environment."],"exampleFix":"Inspect the wrapped error for the underlying cause and correct the failing condition (parsing expiry time); 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"}