{"record":{"id":"8f7f5eea87b52bd3","repo":"hasura/graphql-engine","slug":"update-check-request-w","errorCode":null,"errorMessage":"update check request: %w","messagePattern":"update check request: %w","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cli/update/update.go","lineNumber":32,"sourceCode":"\t\"time\"\n\n\t\"github.com/Masterminds/semver/v3\"\n\t\"github.com/hasura/graphql-engine/cli/v2/internal/errors\"\n)\n\nconst updateCheckURL = \"https://releases.hasura.io/graphql-engine?agent=cli\"\n\ntype updateCheckResponse struct {\n\tLatest     *semver.Version `json:\"latest\"`\n\tPreRelease *semver.Version `json:\"prerelease\"`\n}\n\nfunc getLatestVersion() (*semver.Version, *semver.Version, error) {\n\tvar op errors.Op = \"update.getLatestVersion\"\n\n\tres, err := http.Get(updateCheckURL)\n\tif err != nil {\n\t\treturn nil, nil, errors.E(op, fmt.Errorf(\"update check request: %w\", err))\n\t}\n\n\tdefer res.Body.Close()\n\n\tvar response updateCheckResponse\n\n\terr = json.NewDecoder(res.Body).Decode(&response)\n\tif err != nil {\n\t\treturn nil, nil, errors.E(op, fmt.Errorf(\"decoding update check response: %w\", err))\n\t}\n\n\tif response.Latest == nil && response.PreRelease == nil {\n\t\treturn nil, nil, errors.E(\n\t\t\top,\n\t\t\tfmt.Errorf(\"expected version info not found at %s\", updateCheckURL),\n\t\t)\n\t}\n","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/hasura/graphql-engine/blob/724551b9ae87845594ef0408cff0e50eb6c90dc5/cli/update/update.go#L14-L50","documentation":"getLatestVersion performs the HTTP GET against the update-check URL and wraps transport-level failures. This means DNS resolution failure, connection refused/timeout, TLS errors, or a proxy blocking the request - anything before a response is received.","triggerScenarios":"Calling update.HasUpdate() with no internet access, a firewall/proxy blocking the update endpoint, broken DNS, or an expired TLS root store in old runtimes.","commonSituations":"CI runners or air-gapped environments with egress restrictions, corporate proxies requiring configuration, captive portals, or intermittent network drops during a CLI run.","solutions":["Check network/proxy configuration (HTTP_PROXY/HTTPS_PROXY) and retry when online","If running offline or in CI, disable update checks via config/env so HasUpdate is not called","Verify the update endpoint is reachable: curl -I the updateCheckURL from the same environment","Update CA certificates if TLS handshake is the underlying cause"],"exampleFix":"// before\nlatest, pre, err := update.HasUpdate()\nif err != nil { return err }\n\n// after\nlatest, pre, err := update.HasUpdate()\nif err != nil {\n    log.Printf(\"update check skipped: %v\", err) // non-fatal, degrade gracefully\n}","handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"if _, _, err := update.HasUpdate(); err != nil {\n    // treat as 'no update info': log at debug level and continue\n    log.Printf(\"update check unavailable: %v\", err)\n}","preventionTips":["Disable update checks in offline/CI environments","Keep update-check failures non-fatal in wrappers around the CLI","Set proxy env vars when behind corporate proxies"],"tags":["network","update-check","http","hasura-cli"],"backgroundTag":"network-request-failed","analyzedSha":"724551b9ae87845594ef0408cff0e50eb6c90dc5","analyzedAt":"2026-08-28T07:32:55.105Z","schemaVersion":2},"datasetVersion":"2026-08-28T11:17:15.048Z"}