zed-industries/zed · error · anyhow::Error

download failed with status {}

Error message

download failed with status {}

What it means

An extension-initiated file download returned a non-success HTTP status after the request itself succeeded (context 'downloading release'). The ensure! guard rejects any non-2xx status ({status}), so the file at the URL is not saved; common causes are a missing release asset (404) or rate-limiting (429) on the extension's download URL.

Source

Thrown at crates/extension_host/src/wasm_host/wit/since_v0_1_0.rs:531

            status,
        );

        Ok(())
    }

    async fn download_file(
        &mut self,
        url: String,
        path: String,
        file_type: DownloadedFileType,
    ) -> wasmtime::Result<Result<(), String>> {
        maybe!(async {
            let path = PathBuf::from(path);
            let extension_work_dir = self.host.work_dir.join(self.manifest.id.as_ref());

            self.host.fs.create_dir(&extension_work_dir).await?;

            let destination_path = self
                .host
                .writeable_path_from_extension(&self.manifest.id, &path)
                .await?;

            let mut response = self
                .host
                .http_client
                .get(&url, Default::default(), true)
                .await
                .context("downloading release")?;

            anyhow::ensure!(
                response.status().is_success(),
                "download failed with status {}",
                response.status()
            );
            let mut body = BufReader::new(response.body_mut());

View on GitHub (pinned to 5a9b9558db)

Solutions

  1. Verify the download URL points at an asset that actually exists (404 is the most common cause)
  2. Retry with backoff for transient failures such as 429/5xx
  3. Include the status code in user-facing logs so extension authors can diagnose asset hosting issues
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at crates/extension_host/src/wasm_host/wit/since_v0_1_0.rs:529 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of zed-industries/zed@5a9b9558db (2026-08-20). Data as JSON: /api/errors/3795c69a196eb8ad. Report an issue: GitHub.