gitbutlerapp/gitbutler · error

Failed to fetch release information from

Error message

Failed to fetch release information from {url}. HTTP {response_code}

What it means

For the default VersionRequest::Release mode, fetch_release bails with the requested URL and HTTP status when the releases endpoint returns non-200. Including the URL helps diagnose redirects, blocks, or wrong endpoints.

Solutions

  1. Check the printed URL in a browser/curl to see the actual response
  2. Wait and retry if rate-limited (403 with rate-limit headers)
  3. Verify at least one release is published for the project
  4. Check proxy/firewall settings for the API domain

Example fix

null
Defensive patterns

Strategy: retry

Validate before calling

let resp = reqwest::Client::new()
    .get("https://api.github.com/repos/OWNER/REPO/releases/latest")
    .header("User-Agent", "app")
    .send().await?;
let ok = resp.status().is_success();

Try / catch

match result {
    Err(e) if e.to_string().contains("HTTP") => {
        // inspect printed URL + status; backoff and retry on 403/5xx
    }
    other => other?,
}

Prevention

When it happens

Trigger: Latest-release API call returns 404 (no releases published), 403 (rate limit/blocked), 5xx (server error), or an unexpected status after redirects.

Common situations: Fresh project with no published releases yet, corporate proxy blocking the API host, GitHub API rate limiting in CI, transient outages.

Related errors


AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18). Data as JSON: /api/errors/056e4eeab2f2a6ba. Report an issue: GitHub.

Appendix: source

Thrown at crates/but-installer/src/release.rs:61

            .with_context(|| format!("Failed to fetch release information from {url}"))?;
    }

    let response_code = easy
        .response_code()
        .context("Failed to get response code")?;

    if response_code != 200 {
        match &config.version_request {
            crate::config::VersionRequest::Specific(version) => {
                bail!(
                    "Failed to fetch release information for version {version}. Version may not exist. HTTP {response_code}"
                );
            }
            crate::config::VersionRequest::Nightly => {
                bail!("Failed to fetch nightly release information. HTTP {response_code}");
            }
            crate::config::VersionRequest::Release => {
                bail!("Failed to fetch release information from {url}. HTTP {response_code}");
            }
        }
    }

    // Validate the effective URL after following redirects
    // This protects against malicious redirects to untrusted domains or insecure protocols
    let effective_url = easy
        .effective_url()
        .context("Failed to get effective URL")?
        .ok_or_else(|| anyhow!("Effective URL is missing"))?;

    validate_api_url(effective_url).with_context(|| {
        format!("Release API was redirected to an untrusted URL: {effective_url}")
    })?;

    let release: Release =
        serde_json::from_slice(&response_data).context("Failed to parse release information")?;

View on GitHub (pinned to 58e5313667)