{"record":{"id":"0f0c83671f90c3cc","repo":"Hmbown/CodeWhale","slug":"failed-to-fetch-description-from-url-http-st","errorCode":null,"errorMessage":"failed to fetch {description} from {url}: HTTP {status}\n{body}","messagePattern":"failed to fetch (.+?) from (.+?): HTTP (.+?)\n(.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/cli/src/update.rs","lineNumber":1423,"sourceCode":"        .get(url)\n        .header(reqwest::header::ACCEPT, \"application/vnd.github+json\")\n        .send()\n        .with_context(|| format!(\"failed to fetch {description} from {url}\"))?;\n    let status = response.status();\n    let body = response\n        .text()\n        .with_context(|| format!(\"failed to read {description} response body from {url}\"))?;\n    Ok((status, body))\n}\n\nfn fetch_release_json(url: &str, description: &str, proxy: Option<&Proxy>) -> Result<String> {\n    let mut last_error = None;\n    for attempt in 1..=UPDATE_HTTP_ATTEMPTS {\n        match fetch_release_json_once(url, description, proxy) {\n            Ok((status, body)) if status.is_success() => return Ok(body),\n            Ok((status, body)) => {\n                let error =\n                    anyhow!(\"failed to fetch {description} from {url}: HTTP {status}\\n{body}\");\n                if should_retry_http_status(status) && attempt < UPDATE_HTTP_ATTEMPTS {\n                    last_error = Some(error);\n                    sleep_before_update_retry(attempt);\n                    continue;\n                }\n                return Err(error);\n            }\n            Err(error) if attempt < UPDATE_HTTP_ATTEMPTS => {\n                last_error = Some(error);\n                sleep_before_update_retry(attempt);\n            }\n            Err(error) => return Err(error),\n        }\n    }\n    Err(last_error.unwrap_or_else(|| anyhow!(\"failed to fetch {description} from {url}\")))\n}\n\nfn should_retry_http_status(status: reqwest::StatusCode) -> bool {","sourceCodeStart":1405,"sourceCodeEnd":1441,"githubUrl":"https://github.com/Hmbown/CodeWhale/blob/73e0f67d83c59909b571efdfc88c4bc28c309cb1/crates/cli/src/update.rs#L1405-L1441","documentation":"fetch_release_json retries UPDATE_HTTP_ATTEMPTS times; when the server answers with a non-success HTTP status that is not retryable (or retries are exhausted), this error is thrown including the description, URL, status code, and the response body. It is the definitive failure of a release-metadata fetch.","triggerScenarios":"GET of the release JSON URL returns 404 (release/tag removed), 403 (rate limited by GitHub without retry eligibility, or proxy blocked), 401, or retries against 5xx/429/408 were exhausted.","commonSituations":"GitHub API rate limit exhausted (403 with X-RateLimit-Remaining: 0), a corporate proxy blocking the update host, the release artifact renamed or deleted, or offline/VPN DNS hijack returning an error page.","solutions":["Read the HTTP status and body in the message: fix auth (GITHUB_TOKEN) for 401/403, or wait for rate-limit reset.","Check network/proxy settings (HTTPS_PROXY) and connectivity to the URL shown.","Verify the release/tag still exists at the printed URL.","Retry later if the status was a transient 5xx/429 and all attempts were consumed."],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// pre-flight check of the release URL\nconst res = await fetch(url);\nif (res.status === 403 && res.headers.get('x-ratelimit-remaining') === '0') {\n  console.error('rate limited; set a token or wait for reset');\n}","typeGuard":null,"tryCatchPattern":"match fetch_release_json(url, desc, proxy) {\n  Ok(body) => body,\n  Err(e) if e.to_string().contains(\"HTTP 403\") => {\n    // configure auth token / wait for rate-limit reset, then retry once\n  }\n  Err(e) => return Err(e),\n}","preventionTips":["Set an API token before updating to avoid rate limits.","Check proxy env vars (HTTPS_PROXY) are correct.","Verify the release/tag URL exists before scripting updates.","Schedule updates away from rate-limit windows."],"tags":["http","update","network","github"],"backgroundTag":"http-error-response","analyzedSha":"73e0f67d83c59909b571efdfc88c4bc28c309cb1","analyzedAt":"2026-09-22T01:30:00.501Z","contentChangedAt":"2026-09-22T01:30:00.501Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}