{"record":{"id":"7256d388c5568b27","repo":"cloudflare/cloudflared","slug":"unable-to-check-for-update-d","errorCode":null,"errorMessage":"unable to check for update: %d","messagePattern":"unable to check for update: (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"cmd/cloudflared/updater/workers_service.go","lineNumber":84,"sourceCode":"\tq.Add(ClientVersionName, s.currentVersion)\n\n\tif s.opts.IsBeta {\n\t\tq.Add(BetaKeyName, \"true\")\n\t}\n\n\tif s.opts.RequestedVersion != \"\" {\n\t\tq.Add(VersionKeyName, s.opts.RequestedVersion)\n\t}\n\n\treq.URL.RawQuery = q.Encode()\n\tresp, err := client.Do(req)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tdefer resp.Body.Close()\n\n\tif resp.StatusCode != 200 {\n\t\treturn nil, fmt.Errorf(\"unable to check for update: %d\", resp.StatusCode)\n\t}\n\n\tvar v VersionResponse\n\tif err := json.NewDecoder(resp.Body).Decode(&v); err != nil {\n\t\treturn nil, err\n\t}\n\n\tif v.Error != \"\" {\n\t\treturn nil, errors.New(v.Error)\n\t}\n\n\tversionToUpdate := \"\"\n\tif v.ShouldUpdate {\n\t\tversionToUpdate = v.Version\n\t}\n\n\treturn NewWorkersVersion(v.URL, versionToUpdate, v.Checksum, s.targetPath, v.UserMessage, v.IsCompressed), nil\n}","sourceCodeStart":66,"sourceCodeEnd":102,"githubUrl":"https://github.com/cloudflare/cloudflared/blob/2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f/cmd/cloudflared/updater/workers_service.go#L66-L102","documentation":"The Workers-service based updater (Check) requests cloudflared's latest version metadata and requires HTTP 200. Any other status from the update endpoint (proxy interference, Cloudflare-side outage, rate limiting, captive portal) aborts the update check with this error carrying the status code.","triggerScenarios":"Calling the update check path (`cloudflared update`, or periodic auto-update) when the workers.dev update service responds with a non-200 status — 4xx from a blocked/proxied network, 5xx during a service incident, or 403 from egress filtering.","commonSituations":"Corporate proxies/TLS interception rewriting the response; running behind a firewall that blocks the update endpoint; transient Cloudflare Workers errors; machines without proper DNS egress.","solutions":["Retry the update later — non-200 is often transient (5xx) or network-policy related.","Check egress/proxy rules for the update endpoint host and allow it, or set proxy env vars (HTTPS_PROXY) so cloudflared can reach it.","Disable auto-updates (features: no auto-update in config or --no-autoupdate) and manage versions via your package manager instead."],"exampleFix":"// before\ncloudflared update   # fails behind corporate proxy\n// after\nexport HTTPS_PROXY=http://proxy.corp:8080\ncloudflared update\n# or permanently:\n# config.yml -> features: [\"no-auto-update\"]","handlingStrategy":"retry","validationCode":"resp, err := http.Get(\"https://update.argotunnel.com/\")\nif err != nil || resp.StatusCode != http.StatusOK {\n    // update endpoint unreachable or non-200; skip update attempt\n}","typeGuard":null,"tryCatchPattern":"// retry with backoff; fall back to skipping update\nfor i := 0; i < 3; i++ {\n    if err := checkForUpdate(); err == nil { break }\n    time.Sleep(time.Duration(1<<i) * time.Second)\n}","preventionTips":["Run `cloudflared update` with network egress to the update endpoint (check proxies/firewalls).","Set HTTPS_PROXY in restricted networks.","Consider disabling auto-update and managing versions via a package manager."],"tags":["http","update","network","cli"],"backgroundTag":"http-non-200-response","analyzedSha":"2253eeeb25a44a713a4b60b8ba1e1b3f377d1a0f","analyzedAt":"2026-09-06T04:14:33.757Z","contentChangedAt":"2026-09-06T04:14:33.757Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}