{"record":{"id":"cb13f86950766e6f","repo":"zed-industries/zed","slug":"failed-to-download-update","errorCode":null,"errorMessage":"failed to download update: {:?}","messagePattern":"failed to download update: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/auto_update/src/auto_update.rs","lineNumber":1085,"sourceCode":"                path,\n                error\n            );\n        }\n    }\n\n    Ok(())\n}\n\nasync fn download_release(\n    target_path: &Path,\n    release: ReleaseAsset,\n    client: Arc<HttpClientWithUrl>,\n    mut on_progress: impl FnMut(Option<f32>),\n) -> Result<()> {\n    let mut target_file = File::create(&target_path).await?;\n\n    let mut response = client.get(&release.url, Default::default(), true).await?;\n    anyhow::ensure!(\n        response.status().is_success(),\n        \"failed to download update: {:?}\",\n        response.status()\n    );\n\n    let total_bytes = response\n        .headers()\n        .get(http_client::http::header::CONTENT_LENGTH)\n        .and_then(|value| value.to_str().ok())\n        .and_then(|value| value.parse::<u64>().ok())\n        .filter(|total_bytes| *total_bytes > 0);\n\n    let mut downloaded_bytes: u64 = 0;\n    let mut last_reported_percent: Option<u8> = None;\n    let mut buffer = [0u8; 8192];\n    let body = response.body_mut();\n    loop {\n        let bytes_read = body.read(&mut buffer).await?;","sourceCodeStart":1067,"sourceCodeEnd":1103,"githubUrl":"https://github.com/zed-industries/zed/blob/916fc2b8cb3a815cbef4a3b40e13081be72036b6/crates/auto_update/src/auto_update.rs#L1067-L1103","documentation":"download_release issued a GET for the update archive and the response status was not success; the status code is embedded in the message, indicating the update server or CDN rejected the download (e.g. 404 for a yanked asset, 5xx outage) before any bytes were written to the target file.","triggerScenarios":"Thrown at crates/auto_update/src/auto_update.rs:1074 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry the update download — CDN hiccups and transient 5xx usually resolve on retry","Confirm the release channel/URL still points at a published asset","Free disk space and check permissions if failures persist alongside partial downloads"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"916fc2b8cb3a815cbef4a3b40e13081be72036b6","analyzedAt":"2026-08-20T19:29:52.058Z","contentChangedAt":"2026-08-20T19:29:52.058Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}