Zackriya-Solutions/meetily · error · anyhow::Error

Download failed with status

Error message

Download failed with status: {}

What it means

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.

Solutions

  1. Open the exact URL from the log line in a browser or curl to see the real status body
  2. 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
  3. 429/5xx: wait and retry with backoff; the download restarts cleanly from byte 0
  4. 401/403: check proxy/firewall rules and any HF token requirements for the repo
Defensive patterns

Strategy: retry

Validate before calling

// Rust: preflight the URL so a 404 surfaces before the UI enters downloading state
let resp = client.head(model_url).send().await?;
if !resp.status().is_success() {
    return Err(anyhow!("Model URL unreachable ({}): {}", resp.status(), model_url));
}

Try / catch

match engine.download_model(name, None).await {
  Err(e) if String::from(&e).contains("429") || String::from(&e).contains("5") => {
      tokio::time::sleep(Duration::from_secs(30)).await; // rate limit / 5xx: back off and retry
      engine.download_model(name, None).await
  }
  other => other,
}

Prevention

When it happens

Trigger: 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.

Common situations: 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.

Related errors


AI-assisted analysis of Zackriya-Solutions/meetily@a2cb62e827 (2026-09-12). Data as JSON: /api/errors/5e29050774b9f665. Report an issue: GitHub.

Appendix: source

Thrown at frontend/src-tauri/src/whisper_engine/whisper_engine.rs:1155

            let mut models = self.available_models.write().await;
            if let Some(model_info) = models.get_mut(model_name) {
                model_info.status = ModelStatus::Downloading { progress: 0 };
            }
        }

        let client = Client::builder()
            .user_agent(concat!("Meetily/", env!("CARGO_PKG_VERSION")))
            .build()
            .map_err(|e| anyhow!("Failed to create download client: {}", e))?;
        let response = tokio::select! {
            biased;
            _ = active_download.cancellation.cancelled() => return Err(DownloadCancelled.into()),
            response = client.get(model_url).send() => response
                .map_err(|e| anyhow!("Failed to start download: {}", e))?,
        };

        if !response.status().is_success() {
            return Err(anyhow!("Download failed with status: {}", response.status()));
        }

        let total_size = response.content_length().unwrap_or(0);
        let mut file = fs::File::create(file_path)
            .await
            .map_err(|e| anyhow!("Failed to create file: {}", e))?;

        use futures_util::StreamExt;
        let mut stream = response.bytes_stream();
        let mut downloaded = 0u64;
        let mut last_progress_report = 0u8;
        let mut last_report_time = std::time::Instant::now();

        if let Some(ref callback) = progress_callback {
            callback(0);
        }

        loop {

View on GitHub (pinned to a2cb62e827)