hasura/graphql-engine · error
command: check update: %w
Error message
command: check update: %w
What it means
Wraps any failure of update.HasUpdate — the check against the update index (LastUpdateCheckFile / GitHub releases) used to determine whether a newer CLI version exists. It covers network errors, release-API failures, and cache-file issues during `hasura update-cli`.
Source
Thrown at cli/commands/update-cli.go:100
}
var versionToBeInstalled *semver.Version
if o.version != "" {
// parse the version
versionToBeInstalled, err = semver.NewVersion(o.version)
if err != nil {
return errors.E(op, fmt.Errorf("unable to parse version: %w", err))
}
} else {
o.EC.Spin("Checking for update... ")
hasUpdate, latestVersion, hasPreReleaseUpdate, preReleaseVersion, err := update.HasUpdate(
currentVersion,
o.EC.LastUpdateCheckFile,
)
o.EC.Spinner.Stop()
if err != nil {
return errors.E(op, fmt.Errorf("command: check update: %w", err))
}
ec.Logger.Debugln(
"hasUpdate: ",
hasUpdate,
"latestVersion: ",
latestVersion,
"hasPreReleaseUpdate: ",
hasPreReleaseUpdate,
"preReleaseVersion: ",
preReleaseVersion,
"currentVersion:",
currentVersion,
)
if showPrompt {
switch {
case hasUpdate:View on GitHub (pinned to 724551b9ae)
Solutions
- Check connectivity to github.com/api.github.com (curl) and configure proxy env (HTTPS_PROXY) if needed
- Retry later if GitHub API rate-limited (check rate-limit headers)
- Remove the stale last-update-check cache file so a fresh check is performed
- Alternatively download the desired release binary directly and skip update-cli
Example fix
# before $ hasura update-cli # behind a proxy # after $ export HTTPS_PROXY=http://proxy:8080 && hasura update-cli
Defensive patterns
Strategy: retry
Validate before calling
// probe update endpoints first
client := http.Client{Timeout: 5 * time.Second}
if _, err := client.Head("https://api.github.com/repos/hasura/graphql-engine/releases/latest"); err != nil {
log.Fatal("update check unreachable: ", err)
} Try / catch
var err error
for attempt := 1; attempt <= 3; attempt++ {
if err = updateCmd.Run(); err == nil || !strings.Contains(err.Error(), "check update") {
break
}
time.Sleep(time.Duration(attempt) * 2 * time.Second)
} Prevention
- Set HTTPS_PROXY in proxied environments
- Cache/download release binaries directly in rate-limited CI
When it happens
Trigger: Running `hasura update-cli` with no network access, GitHub API rate-limiting/unavailability, TLS/proxy interception, or an unreadable/corrupt last-update-check cache file.
Common situations: Corporate proxies blocking api.github.com, CI runners without egress, rate-limited CI (shared IPs), or a corrupted file at the last-update-check path.
Related errors
- applying migrations on source: %s: %w
- cannot update from a non-semver version: %s
- unable to parse version: %w
- apply update: %w
- error serving console: %w
AI-assisted analysis of hasura/graphql-engine@724551b9ae (2026-08-28).
Data as JSON: /api/errors/504f2a716d7c70b8.
Report an issue: GitHub.