Zackriya-Solutions/meetily · error

Partial response declared {} bytes, expected {}

Error message

Partial response declared {} bytes, expected {}

What it means

Thrown by `validate_partial_response` when the 206 response's Content-Length header disagrees with the computed range length (`end - start + 1`). Even if Content-Range is correct, a body size mismatch means the transferred bytes won't complete the model file correctly, so the download is rejected.

Source

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

        };
        if start != expected_start || end != exact_bytes - 1 || total != exact_bytes {
            return Err(anyhow!(
                "Partial response range {}-{} / {} does not match {}-{} / {}",
                start,
                end,
                total,
                expected_start,
                exact_bytes - 1,
                exact_bytes
            ));
        }
        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()

View on GitHub (pinned to a2cb62e827)

Solutions

  1. Retry the range request; transient proxy/CDN issues often resolve.
  2. Bypass intermediaries (proxy, VPN, HTTPS-scanning antivirus) for the download.
  3. Fall back to a full download from byte 0 if range requests keep failing.
  4. Use a different mirror that serves correct range responses.
Defensive patterns

Strategy: retry

Validate before calling

let probe = client.get(url).header("Range", "bytes=0-99").send().await?;
let cr_ok = probe.headers().get("content-range").is_some();
let cl_ok = probe.headers().get("content-length").map(|v| v.to_str().ok()).flatten().map(|s| s.parse::<u64>() == Ok(100)).unwrap_or(true);
if !cr_ok || !cl_ok { eprintln!("mirror range responses inconsistent; choose another source"); }

Try / catch

match result {
    Err(e) if e.to_string().contains("Partial response declared") => retry_range_request_or_full_download(),
    other => other,
}

Prevention

When it happens

Trigger: Range GET for the Parakeet model returns 206 with correct Content-Range but Content-Length (if present) differs from `end - start + 1` — e.g. the server truncates the body or lies about the length.

Common situations: Proxy or CDN mangling range responses; server bug sending fewer bytes than declared; connection interrupted such that the declared length no longer matches.

Related errors


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