{"record":{"id":"b3f1da1b03940faf","repo":"Zackriya-Solutions/meetily","slug":"full-response-declared-bytes-expected","errorCode":null,"errorMessage":"Full response declared {} bytes, expected {}","messagePattern":"Full response declared (.+?) bytes, expected (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":735,"sourceCode":"                value\n                    .to_str()\n                    .map_err(|error| anyhow!(\"Invalid Content-Length header encoding: {}\", error))?\n                    .parse()\n                    .map_err(|error| anyhow!(\"Invalid Content-Length header: {}\", error))\n            })\n            .transpose()\n    }\n\n    fn validate_full_response(response: &reqwest::Response, exact_bytes: u64) -> Result<()> {\n        if response.status() != reqwest::StatusCode::OK {\n            return Err(anyhow!(\n                \"Expected full 200 response, received {}\",\n                response.status()\n            ));\n        }\n        if let Some(content_length) = Self::declared_content_length(response)? {\n            if content_length != exact_bytes {\n                return Err(anyhow!(\n                    \"Full response declared {} bytes, expected {}\",\n                    content_length,\n                    exact_bytes\n                ));\n            }\n        }\n        Ok(())\n    }\n\n    fn validate_partial_response(\n        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()","sourceCodeStart":717,"sourceCodeEnd":753,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L717-L753","documentation":"Thrown by `validate_full_response` when a 200 response's declared Content-Length differs from the exact expected byte size of the Parakeet model. The downloader validates the size up-front to avoid saving a truncated or wrong file; a mismatch aborts the download.","triggerScenarios":"Full GET of the model returns 200 but its Content-Length does not equal the expected `exact_bytes` for that model build — e.g. the mirror serves a different (older/newer) model version, or the server compresses/transforms the body.","commonSituations":"Out-of-date mirror hosting a different model revision; transparent gzip/deflate proxy altering the transfer; CDN serving a partial error page with 200 status; app expects a newer model version than the mirror has.","solutions":["Update the expected model URL or app version so the expected byte size matches the file actually served.","Point the download at the official source instead of the stale mirror.","Disable transparent compression/proxies for this request.","Compare `curl -sI <url> | grep Content-Length` against the expected size to identify which side is stale."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"let expected: u64 = MODEL_EXPECTED_BYTES;\nlet resp = client.head(url).send().await?;\nlet cl = resp.headers().get(\"content-length\").and_then(|v| v.to_str().ok()).and_then(|s| s.parse::<u64>().ok());\nif cl != Some(expected) { eprintln!(\"mirror file size {:?} != expected {}; mirror is stale\", cl, expected); }","typeGuard":null,"tryCatchPattern":"match result {\n    Err(e) if e.to_string().contains(\"Full response declared\") => invalidate_partial_file_and_redownload(),\n    other => other,\n}","preventionTips":["Keep app and model versions in sync; update expected sizes when models change.","Verify mirror freshness before large downloads.","Disable transparent compression for binary downloads."],"tags":["network","http","download","integrity"],"backgroundTag":"content-length-mismatch","analyzedSha":"a2cb62e827da7ef59f65064c97233efb2313878e","analyzedAt":"2026-09-12T11:12:14.152Z","contentChangedAt":"2026-09-12T11:12:14.152Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}