gitbutlerapp/gitbutler · error
Request failed
Error message
Request failed: {e} What it means
Thrown when the HTTP POST to the update server (default https://app.gitbutler.com/updates) fails at the transport level — the request could not be sent or completed. This covers DNS resolution failure, connection refusal/reset, TLS errors, and the client's 30-second timeout. The error wraps the underlying reqwest error including its cause.
Solutions
- Verify network connectivity (curl https://app.gitbutler.com/updates) and retry.
- Check proxy/VPN/firewall settings and set HTTPS_PROXY if a proxy is required.
- Check DNS resolution of app.gitbutler.com.
- If timeouts recur on slow links, retry later; the timeout is fixed at 30 seconds in the client builder.
- Check GitButler service status for an update-server outage.
Example fix
// before: one-shot request
let response = client.post(url).json(&request_body).send().await
.map_err(|e| anyhow::anyhow!("Request failed: {e}"))?;
// after: simple bounded retry for transient failures
let response = loop {
match client.post(&url).json(&request_body).send().await {
Ok(r) => break r.map_err(|e| anyhow::anyhow!("Request failed: {e}")),
Err(e) if attempts < 2 => { attempts += 1; tokio::time::sleep(Duration::from_secs(2)).await; }
Err(e) => return Err(anyhow::anyhow!("Request failed: {e}")),
}
}; Defensive patterns
Strategy: retry
Validate before calling
// quick reachability probe before calling the API
let reachable = std::net::TcpStream::connect("app.gitbutler.com:443").is_ok();
if !reachable { eprintln!("offline; skip update check"); } Try / catch
match but_update::check_status(app, &settings, &mut cache) {
Err(e) if e.to_string().contains("Request failed") => {
// network-level failure: retry with backoff or fall back to cache
log::warn!("update check network failure: {e:#}");
}
other => other?,
} Prevention
- Configure HTTPS_PROXY correctly in corporate environments.
- Handle captive portals: authenticate to the network before the first update check.
- Implement bounded retry with backoff around update checks.
- Cache the last successful check result and show it when the network fails.
When it happens
Trigger: check_status/check_status_with_url issuing client.post(url).json(&request_body).send() when the network is unreachable, the update host is down, DNS fails, a proxy blocks the connection, TLS fails, or the 30s REQUEST_TIMEOUT elapses.
Common situations: Developer machine offline or on a captive portal; corporate firewall/proxy blocking app.gitbutler.com; DNS misconfiguration; slow networks triggering the 30s timeout; update server outage.
Understand the failure class
Background: 'Something went wrong' / 'Request failed (500)' / 'HTTP error! status: 404' — what failed HTTP requests actually mean and how to find the real cause — this error's family across 28 libraries.
Related errors
- Anthropic API error ( )
- Bitbucket request failed
- Bitbucket request failed
- Download failed with HTTP status
- Download of failed with HTTP status
AI-assisted analysis of gitbutlerapp/gitbutler@58e5313667 (2026-09-18).
Data as JSON: /api/errors/d2594cb133c3e7ce.
Report an issue: GitHub.
Appendix: source
Thrown at crates/but-update/src/check.rs:125
.default_headers(headers)
.timeout(REQUEST_TIMEOUT)
.build()?;
let url = url_override.unwrap_or(UPDATES_CHECK_URL).to_string();
let result = std::thread::spawn(move || -> anyhow::Result<CheckUpdateStatus> {
let runtime = tokio::runtime::Builder::new_current_thread()
.enable_all()
.build()
.map_err(|e| anyhow::anyhow!("Failed to create runtime: {e}"))?;
runtime.block_on(async {
let response = client
.post(url)
.json(&request_body)
.send()
.await
.map_err(|e| anyhow::anyhow!("Request failed: {e}"))?
.error_for_status()
.map_err(|e| anyhow::anyhow!("Server returned error: {e}"))?;
let update_info = response
.json::<CheckUpdateStatus>()
.await
.map_err(|e| anyhow::anyhow!("Failed to parse response: {e}"))?;
Ok(update_info)
})
})
.join()
.map_err(|_| anyhow::anyhow!("Update check thread panicked"))?;
// Save to cache (convert to but_db types)
if let Ok(status) = &result {
let now = chrono::Utc::now();
View on GitHub (pinned to 58e5313667)