juanfont/headscale · error
parsing expiry time: %w
Error message
parsing expiry time: %w
What it means
Error "parsing expiry time: %w" thrown in juanfont/headscale.
Source
Thrown at cmd/headscale/cli/nodes.go:212
if resp.StatusCode() != http.StatusOK {
return apiError(resp.StatusCode(), resp.ApplicationproblemJSONDefault)
}
return printOutput(cmd, resp.JSON200.Node, "Node expiry disabled")
}
expiry, _ := cmd.Flags().GetString("expiry")
now := time.Now()
expiryTime := now
if expiry != "" {
var err error
expiryTime, err = time.Parse(time.RFC3339, expiry)
if err != nil {
return fmt.Errorf("parsing expiry time: %w", err)
}
}
resp, err := client.ExpireNodeWithResponse(ctx, nodeID, clientv1.ExpireNodeJSONRequestBody{
Expiry: &expiryTime,
})
if err != nil {
return fmt.Errorf("expiring node: %w", err)
}
if resp.StatusCode() != http.StatusOK {
return apiError(resp.StatusCode(), resp.ApplicationproblemJSONDefault)
}
node := resp.JSON200.Node
if now.Equal(expiryTime) || now.After(expiryTime) {
return printOutput(cmd, node, "Node expired")View on GitHub (pinned to 565fd254d0)
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.
Example fix
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.
When it happens
Trigger: Thrown at cmd/headscale/cli/nodes.go:212 when the library encounters an invalid state.
Common situations: The --expiry value could not be parsed as a time. Use RFC3339 format (e.g. 2026-01-02T15:04:05Z) for the expiry flag.
AI-assisted analysis of juanfont/headscale@565fd254d0 (2026-08-15).
Data as JSON: /api/errors/e7eeaee9b5f4734a.
Report an issue: GitHub.