Zackriya-Solutions/meetily · error

Expected range-not-satisfiable 416 response, received {}

Error message

Expected range-not-satisfiable 416 response, received {}

What it means

During Parakeet model download verification, the engine probes the server with a Range request at the file's total size to confirm exact file length; it expects an HTTP 416 Range Not Satisfiable reply. This error is thrown by validate_unsatisfied_response when the server returned a different status code instead.

Source

Thrown at frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs:792

        let expected_length = end
            .checked_sub(start)
            .and_then(|length| length.checked_add(1))
            .ok_or_else(|| anyhow!("Partial response range length overflow"))?;
        if let Some(content_length) = Self::declared_content_length(response)? {
            if content_length != expected_length {
                return Err(anyhow!(
                    "Partial response declared {} bytes, expected {}",
                    content_length,
                    expected_length
                ));
            }
        }
        Ok(())
    }

    fn validate_unsatisfied_response(response: &reqwest::Response, exact_bytes: u64) -> Result<()> {
        if response.status() != reqwest::StatusCode::RANGE_NOT_SATISFIABLE {
            return Err(anyhow!(
                "Expected range-not-satisfiable 416 response, received {}",
                response.status()
            ));
        }
        let content_range = response
            .headers()
            .get(reqwest::header::CONTENT_RANGE)
            .ok_or_else(|| anyhow!("416 response is missing Content-Range"))?;
        match parse_content_range(content_range)? {
            ContentRange::Unsatisfied { total } if total == exact_bytes => Ok(()),
            ContentRange::Unsatisfied { total } => Err(anyhow!(
                "416 response reports {} total bytes, expected {}",
                total,
                exact_bytes
            )),
            ContentRange::Range { .. } => Err(anyhow!("416 response has a satisfied Content-Range")),
        }
    }

View on GitHub (pinned to a2cb62e827)

Solutions

  1. Check the model base_url points at a server supporting HTTP Range requests (curl -r 0-0 -I <url> should return 206).
  2. Verify the artifact filename/URL is correct so the probe does not hit a 404 or 403 error page.
  3. Remove or reconfigure proxies/CDN layers that strip the Range request header.
  4. Retry the download; the engine falls back to a full re-download once a proper 416 is received.

Example fix

// before: mirror ignores Range, probe returns 200
let base_url = "http://internal-mirror/models/hf";
// after: use a Range-capable host (e.g. huggingface.co)
let base_url = "https://huggingface.co/facebook/parakeet-tdt-0.6b-v2-int8/resolve/main";
Defensive patterns

Strategy: retry

Validate before calling

// preflight: confirm the host honors Range requests
curl -s -o /dev/null -w '%{http_code}' -r 0-0 <base_url>/<filename>   # expect 206

Try / catch

match download_result {
    Err(e) if e.to_string().contains("416 response") || e.to_string().contains("Expected range-not-satisfiable") => {
        // mirror lacks Range support: delete partials and re-download, or switch base_url
        remove_partial_files(model_dir).await?;
        retry_download(canonical_base_url).await
    }
    Err(e) => Err(e),
    Ok(p) => Ok(p),
}

Prevention

When it happens

Trigger: The resume-probe Range request (bytes=<exact_bytes>-) against the model artifact URL returns any status other than 416 — e.g. 200 (server ignores Range headers), 403, 404, or 502 from a proxy/CDN in front of the model host.

Common situations: Pointing the download at a mirror that does not support HTTP Range requests; a corporate proxy stripping Range headers; the artifact URL returning an error page (404/403) instead of honoring the probe; S3/CDN misconfiguration where Range requests are rejected.

Related errors


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