{"record":{"id":"fb1c315a37f69ee0","repo":"Zackriya-Solutions/meetily","slug":"partial-response-range-does-not-match","errorCode":null,"errorMessage":"Partial response range {}-{} / {} does not match {}-{} / {}","messagePattern":"Partial response range (.+?)-(.+?) / (.+?) does not match (.+?)-(.+?) / (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":764,"sourceCode":"        response: &reqwest::Response,\n        expected_start: u64,\n        exact_bytes: u64,\n    ) -> Result<()> {\n        if response.status() != reqwest::StatusCode::PARTIAL_CONTENT {\n            return Err(anyhow!(\n                \"Expected partial 206 response, received {}\",\n                response.status()\n            ));\n        }\n        let content_range = response\n            .headers()\n            .get(reqwest::header::CONTENT_RANGE)\n            .ok_or_else(|| anyhow!(\"Partial response is missing Content-Range\"))?;\n        let ContentRange::Range { start, end, total } = parse_content_range(content_range)? else {\n            return Err(anyhow!(\"Partial response has an unsatisfied Content-Range\"));\n        };\n        if start != expected_start || end != exact_bytes - 1 || total != exact_bytes {\n            return Err(anyhow!(\n                \"Partial response range {}-{} / {} does not match {}-{} / {}\",\n                start,\n                end,\n                total,\n                expected_start,\n                exact_bytes - 1,\n                exact_bytes\n            ));\n        }\n        let expected_length = end\n            .checked_sub(start)\n            .and_then(|length| length.checked_add(1))\n            .ok_or_else(|| anyhow!(\"Partial response range length overflow\"))?;\n        if let Some(content_length) = Self::declared_content_length(response)? {\n            if content_length != expected_length {\n                return Err(anyhow!(\n                    \"Partial response declared {} bytes, expected {}\",\n                    content_length,","sourceCodeStart":746,"sourceCodeEnd":782,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L746-L782","documentation":"Thrown by `validate_partial_response` when the parsed Content-Range does not exactly match the requested byte span: start must equal `expected_start`, end must equal `exact_bytes - 1`, and total must equal `exact_bytes`. Any deviation (server returned a different span, or the remote file size changed) aborts the download to guarantee model integrity.","triggerScenarios":"Range GET to the Parakeet model URL returns 206 with a Content-Range whose start/end/total differ from the requested range — e.g. server coalesces ranges, or the file on the server has a different total size than expected.","commonSituations":"Model file updated on the mirror mid-download (total mismatch); server satisfying a larger/smaller range than requested; resuming a partial file from a different model version.","solutions":["Delete the partial download and start over so expected and actual sizes align.","Confirm the mirror serves the exact model version the app expects; switch to the official URL if not.","Retry — if the server modified the file, the new total should now match after a fresh start."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"// Compare remote total with expected before resuming\nlet head = client.head(url).send().await?;\nlet total: Option<u64> = head.headers().get(\"content-length\").and_then(|v| v.to_str().ok()).and_then(|s| s.parse().ok());\nif total != Some(EXPECTED_BYTES) { eprintln!(\"remote file differs from expected; re-download required\"); }","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"does not match\") => delete_partial_and_restart_download(),\n    other => other,\n}","preventionTips":["Pin model versions; never resume across version changes.","Store the expected total size alongside the partial file and re-check before resume.","Use mirrors serving the exact model build."],"tags":["network","http","download","integrity"],"backgroundTag":"content-range-mismatch","analyzedSha":"a2cb62e827da7ef59f65064c97233efb2313878e","analyzedAt":"2026-09-12T11:12:14.152Z","contentChangedAt":"2026-09-12T11:12:14.152Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}