{"record":{"id":"d65ca3eb729d2e75","repo":"Zackriya-Solutions/meetily","slug":"invalid-content-range-end","errorCode":null,"errorMessage":"Invalid Content-Range end: {}","messagePattern":"Invalid Content-Range end: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":221,"sourceCode":"    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 {\n        return Err(anyhow!(\"Content-Range start exceeds end: {}\", value));\n    }\n\n    Ok(ContentRange::Range { start, end, total })\n}\n\n#[derive(Debug)]\npub enum ParakeetEngineError {\n    ModelNotLoaded,\n    ModelNotFound(String),\n    TranscriptionFailed(String),\n    DownloadFailed(String),\n    IoError(std::io::Error),\n    Other(String),","sourceCodeStart":203,"sourceCodeEnd":239,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L203-L239","documentation":"Thrown by parse_content_range when the end component of the Content-Range byte range fails integer parsing (u64). The header splits correctly but the end offset is not a plain unsigned integer, so the received byte count cannot be validated.","triggerScenarios":"A 206 response Content-Range such as 'bytes 0-1k/2048' or 'bytes 0-/2048' (missing or non-numeric end) encountered while validate_partial_response checks a resumed Parakeet model download.","commonSituations":"Wildcard end values in a 206 (only legal in 416 Unsatisfied-Range forms); corrupted headers through proxies; hand-crafted mock server responses used in local testing.","solutions":["Inspect the malformed header echoed in the error message","Fix the mirror to emit decimal end offsets in the form 'bytes start-end/total'","Ensure the client does not pass 416-style 'bytes */total' values into the partial-response parser (those go through validate_unsatisfied_response instead)","Trim stray whitespace/quotes from the header before parsing"],"exampleFix":"// before: header 'bytes 0-*/2048' routed to partial validation\n// after: route '*' end values to the unsatisfied-range parser\nif end_raw == \"*\" { return validate_unsatisfied_response(response); }","handlingStrategy":"validation","validationCode":"fn end_is_numeric(v: &str) -> bool { v.trim().trim_start_matches(\"bytes \").split('/').next().and_then(|r| r.split('-').nth(1)).map_or(false, |s| s.trim().parse::<u64>().is_ok()) }","typeGuard":null,"tryCatchPattern":"match parse_content_range(v) { Err(e) if e.to_string().contains(\"end\") => { log::error!(\"malformed end offset: {v}\"); restart_download() }, other => other }","preventionTips":["Route 416 '*/total' style headers to the unsatisfied-range validator, never the partial one","Test mock servers against the real parser before use","Strip quotes/whitespace from header values"],"tags":["http","content-range","parsing"],"backgroundTag":"invalid-argument-format","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"}