{"record":{"id":"7b2d2c98633e4bd1","repo":"DioxusLabs/dioxus","slug":"download-failed-with-status-url","errorCode":null,"errorMessage":"Download failed with status {}: {url}","messagePattern":"Download failed with status (.+?): (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"packages/cli/src/bundler/tools.rs","lineNumber":265,"sourceCode":"            format!(\"{:x}\", hasher.finalize())\n        }\n    };\n\n    if computed.to_uppercase() != expected_hash.to_uppercase() {\n        bail!(\"Hash mismatch for {url}: expected {expected_hash}, got {computed}\");\n    }\n\n    Ok(data)\n}\n\n/// Download bytes from a URL using the async reqwest client.\npub(crate) async fn download_bytes(url: &str) -> Result<Vec<u8>> {\n    let response = reqwest::get(url)\n        .await\n        .with_context(|| format!(\"Failed to download {url}\"))?;\n\n    if !response.status().is_success() {\n        bail!(\"Download failed with status {}: {url}\", response.status());\n    }\n\n    response\n        .bytes()\n        .await\n        .map(|b| b.to_vec())\n        .with_context(|| format!(\"Failed to read response body from {url}\"))\n}\n\n/// Extract a zip archive to a directory.\nfn extract_zip(data: &[u8], dest: &Path) -> Result<()> {\n    use std::io::Cursor;\n\n    let cursor = Cursor::new(data);\n    let mut archive = zip::ZipArchive::new(cursor).context(\"Failed to read zip archive\")?;\n\n    std::fs::create_dir_all(dest)?;\n","sourceCodeStart":247,"sourceCodeEnd":283,"githubUrl":"https://github.com/DioxusLabs/dioxus/blob/24f6a829df0dfa203961a98ea4cae21c2ff27e28/packages/cli/src/bundler/tools.rs#L247-L283","documentation":"download_bytes got an HTTP response but its status was not success (404, 5xx, etc.) for the requested tool URL. The bundler surfaces the status code and URL so the failing download source can be identified.","triggerScenarios":"Thrown at packages/cli/src/bundler/tools.rs:265 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["The tool download failed with the shown HTTP status. Check network and proxy settings, retry, or install the tool manually."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"24f6a829df0dfa203961a98ea4cae21c2ff27e28","analyzedAt":"2026-08-23T07:10:14.078Z","contentChangedAt":"2026-08-23T07:10:14.078Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}