{"record":{"id":"ba206bd0954a5c23","repo":"gitbutlerapp/gitbutler","slug":"failed-to-fetch-nightly-release-information-http-response","errorCode":null,"errorMessage":"Failed to fetch nightly release information. HTTP {response_code}","messagePattern":"Failed to fetch nightly release information\\. HTTP (.+?)","errorType":"http","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/but-installer/src/release.rs","lineNumber":58,"sourceCode":"            .context(\"Failed to set write function\")?;\n        transfer\n            .perform()\n            .with_context(|| format!(\"Failed to fetch release information from {url}\"))?;\n    }\n\n    let response_code = easy\n        .response_code()\n        .context(\"Failed to get response code\")?;\n\n    if response_code != 200 {\n        match &config.version_request {\n            crate::config::VersionRequest::Specific(version) => {\n                bail!(\n                    \"Failed to fetch release information for version {version}. Version may not exist. HTTP {response_code}\"\n                );\n            }\n            crate::config::VersionRequest::Nightly => {\n                bail!(\"Failed to fetch nightly release information. HTTP {response_code}\");\n            }\n            crate::config::VersionRequest::Release => {\n                bail!(\"Failed to fetch release information from {url}. HTTP {response_code}\");\n            }\n        }\n    }\n\n    // Validate the effective URL after following redirects\n    // This protects against malicious redirects to untrusted domains or insecure protocols\n    let effective_url = easy\n        .effective_url()\n        .context(\"Failed to get effective URL\")?\n        .ok_or_else(|| anyhow!(\"Effective URL is missing\"))?;\n\n    validate_api_url(effective_url).with_context(|| {\n        format!(\"Release API was redirected to an untrusted URL: {effective_url}\")\n    })?;\n","sourceCodeStart":40,"sourceCodeEnd":76,"githubUrl":"https://github.com/gitbutlerapp/gitbutler/blob/58e5313667b857ef39a730e380af31816a7b1768/crates/but-installer/src/release.rs#L40-L76","documentation":"Nightly release lookup in the installer: the HTTP fetch of release metadata did not return 200, even though the curl transfer itself succeeded (proxy/redirect handling already passed). Typical causes are a 404 because no nightly build exists for the request or a 5xx from the hosting service; the status code is embedded to distinguish a missing release from a server problem.","triggerScenarios":"VersionRequest::Nightly with the nightly release endpoint returning 404 (nightly deleted/not yet published), 403 (rate limit), or 5xx.","commonSituations":"Requesting nightly before the first nightly of the day is published, nightly artifact cleanup removed it, unauthenticated GitHub API rate limiting on CI, transient outages.","solutions":["Retry after a delay — nightlies are published periodically","Fall back to the latest stable release","Check rate-limit headers and add authentication or wait for the window to reset","Verify the nightly release exists on the releases page"],"exampleFix":"null","handlingStrategy":"retry","validationCode":"// check the nightly release exists before installing\nlet status = reqwest::Client::new()\n    .head(\"https://api.github.com/repos/OWNER/REPO/releases/tags/nightly\")\n    .send().await?.status();\nlet nightly_available = status == reqwest::StatusCode::OK;","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"nightly release information\") => {\n        // retry with backoff, then fall back to latest stable\n    }\n    other => other?,\n}","preventionTips":["Fall back to stable when nightly is unavailable","Retry after delays — nightlies publish periodically","Use authenticated API calls to avoid rate limits in CI"],"tags":["http","api","nightly","network"],"backgroundTag":"http-non-200-response","analyzedSha":"58e5313667b857ef39a730e380af31816a7b1768","analyzedAt":"2026-09-18T06:50:32.052Z","contentChangedAt":"2026-09-18T06:50:32.052Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}