{"record":{"id":"5e29050774b9f665","repo":"Zackriya-Solutions/meetily","slug":"download-failed-with-status-5e2905","errorCode":null,"errorMessage":"Download failed with status: {}","messagePattern":"Download failed with status: (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/whisper_engine/whisper_engine.rs","lineNumber":978,"sourceCode":"            let mut models = self.available_models.write().await;\n            if let Some(model_info) = models.get_mut(model_name) {\n                model_info.status = ModelStatus::Downloading { progress: 0 };\n            }\n        }\n        \n        log::info!(\"Creating HTTP client and starting request...\");\n        let client = Client::new();\n        \n        log::info!(\"Sending GET request to: {}\", model_url);\n        let response = client.get(model_url).send().await\n            .map_err(|e| anyhow!(\"Failed to start download: {}\", e))?;\n        \n        log::info!(\"Received response with status: {}\", response.status());\n        if !response.status().is_success() {\n            // Remove from active downloads on error\n            let mut active = self.active_downloads.write().await;\n            active.remove(model_name);\n            return Err(anyhow!(\"Download failed with status: {}\", response.status()));\n        }\n        \n        let total_size = response.content_length().unwrap_or(0);\n        log::info!(\"Response successful, content length: {} bytes ({:.1} MB)\", total_size, total_size as f64 / (1024.0 * 1024.0));\n        \n        if total_size == 0 {\n            log::warn!(\"Content length is 0 or unknown - download may not show accurate progress\");\n        }\n        \n        let mut file = fs::File::create(&file_path).await\n            .map_err(|e| anyhow!(\"Failed to create file: {}\", e))?;\n        \n        log::info!(\"File created successfully at: {}\", file_path.display());\n        \n        // Stream download with real progress reporting\n        log::info!(\"Starting streaming download...\");\n        log::info!(\"Expected size: {:.1} MB\", total_size as f64 / (1024.0 * 1024.0));\n","sourceCodeStart":960,"sourceCodeEnd":996,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/0281737d87d26352fb0adc78c8c0975f691b23d1/frontend/src-tauri/src/whisper_engine/whisper_engine.rs#L960-L996","documentation":"The HTTP request to the HuggingFace URL completed but returned a non-success status, which is embedded in the message (e.g. 404 Not Found, 429 Too Many Requests, 401/403). The engine removes the model from active_downloads before returning, so a retry is not blocked. The URL shape is ggerganov/whisper.cpp/resolve/main/ggml-<model>.bin.","triggerScenarios":"Upstream removed or renamed the ggml file (404); HuggingFace rate limiting after repeated large downloads (429); auth-gated or region-blocked CDN node (401/403); transient 5xx from the CDN.","commonSituations":"HF repositories reorganizing files; CI or multi-machine setups hammering the same model URL; corporate egress proxies returning 403; LFS bandwidth quotas on the upstream repo.","solutions":["Open the exact URL from the log line in a browser or curl to see the real status body","404: the model key maps to a dead URL — pin a working revision (?download=true or a commit-pinned resolve URL) or update the URL map","429/5xx: wait and retry with backoff; the download restarts cleanly from byte 0","401/403: check proxy/firewall rules and any HF token requirements for the repo"],"exampleFix":null,"handlingStrategy":"retry","validationCode":"// Rust: preflight the URL so a 404 surfaces before the UI enters downloading state\nlet resp = client.head(model_url).send().await?;\nif !resp.status().is_success() {\n    return Err(anyhow!(\"Model URL unreachable ({}): {}\", resp.status(), model_url));\n}","typeGuard":null,"tryCatchPattern":"match engine.download_model(name, None).await {\n  Err(e) if String::from(&e).contains(\"429\") || String::from(&e).contains(\"5\") => {\n      tokio::time::sleep(Duration::from_secs(30)).await; // rate limit / 5xx: back off and retry\n      engine.download_model(name, None).await\n  }\n  other => other,\n}","preventionTips":["Cache downloaded models and check disk before re-downloading to avoid rate limits","Pin model URLs to a specific commit revision so upstream renames cannot 404 them","Log the exact URL and status; a 404 is a catalog bug, a 429 is a pacing problem"],"tags":["network","http","download","huggingface","rust"],"backgroundTag":"http-error-status-code","analyzedSha":"0281737d87d26352fb0adc78c8c0975f691b23d1","analyzedAt":"2026-08-16T20:57:52.567Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}