{"record":{"id":"384f14547f549a01","repo":"Zackriya-Solutions/meetily","slug":"invalid-unsatisfied-content-range-total","errorCode":null,"errorMessage":"Invalid unsatisfied Content-Range total: {}","messagePattern":"Invalid unsatisfied Content-Range total: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":207,"sourceCode":"\nenum ContentRange {\n    Range { start: u64, end: u64, total: u64 },\n    Unsatisfied { total: u64 },\n}\n\nfn parse_content_range(value: &reqwest::header::HeaderValue) -> Result<ContentRange> {\n    let value = value\n        .to_str()\n        .map_err(|e| anyhow!(\"Invalid Content-Range header encoding: {}\", e))?;\n    let value = value\n        .strip_prefix(\"bytes \")\n        .ok_or_else(|| anyhow!(\"Content-Range must use bytes: {}\", value))?;\n\n    if let Some(total) = value.strip_prefix(\"*/\") {\n        return total\n            .parse()\n            .map(|total| ContentRange::Unsatisfied { total })\n            .map_err(|e| anyhow!(\"Invalid unsatisfied Content-Range total: {}\", e));\n    }\n\n    let (range, total) = value\n        .split_once('/')\n        .ok_or_else(|| anyhow!(\"Malformed Content-Range: {}\", value))?;\n    let (start, end) = range\n        .split_once('-')\n        .ok_or_else(|| anyhow!(\"Malformed Content-Range range: {}\", value))?;\n    let start = start\n        .parse()\n        .map_err(|e| anyhow!(\"Invalid Content-Range start: {}\", e))?;\n    let end = end\n        .parse()\n        .map_err(|e| anyhow!(\"Invalid Content-Range end: {}\", e))?;\n    let total = total\n        .parse()\n        .map_err(|e| anyhow!(\"Invalid Content-Range total: {}\", e))?;\n    if start > end {","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L189-L225","documentation":"For an unsatisfied range ('*/N' form), parse_content_range parses the total as u64. A non-numeric total after '*/' produces 'Invalid unsatisfied Content-Range total: {}'. This validates 416 responses so the client knows the resource size.","triggerScenarios":"Server returns Content-Range: */<non-numeric> (e.g. '*/unknown' or '*/abc') on a 416, and validate_unsatisfied_response passes it to parse_content_range.","commonSituations":"Non-conforming or hand-rolled model server emitting placeholder totals; template-rendered header left unfilled ('*/{total}'); proxy error page masquerading as a 416 with junk header.","solutions":["Log the full header value and fix the server to emit a numeric total (Content-Range: bytes */123456).","Check whether the server is actually an error/HTML page and handle that status separately.","Fall back to re-downloading the whole file when the total cannot be trusted.","Add a server-side test asserting the 416 response format."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":"match parse_content_range(&header) {\n    Ok(ContentRange::Unsatisfied { total }) => set_resume_total(total),\n    Err(_) => {\n        warn!(\"unparseable 416 Content-Range; restarting download from scratch\");\n        restart_full_download(url).await;\n    }\n    Ok(other) => handle(other),\n}","preventionTips":["Confirm the 416 body is an HTTP error page, not the model file, before parsing.","Require numeric totals in your model-server implementation; add tests.","When the total is untrustworthy, restart the download from byte 0.","Log the raw header for support diagnostics."],"tags":["http","range-request","parsing","protocol"],"backgroundTag":"unexpected-response-shape","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"}