{"record":{"id":"90c82aa1db78aaaa","repo":"Zackriya-Solutions/meetily","slug":"invalid-content-range-total","errorCode":null,"errorMessage":"Invalid Content-Range total: {}","messagePattern":"Invalid Content-Range total: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs","lineNumber":224,"sourceCode":"            .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),\n}\n\nimpl std::fmt::Display for ParakeetEngineError {","sourceCodeStart":206,"sourceCodeEnd":242,"githubUrl":"https://github.com/Zackriya-Solutions/meetily/blob/a2cb62e827da7ef59f65064c97233efb2313878e/frontend/src-tauri/src/parakeet_engine/parakeet_engine.rs#L206-L242","documentation":"Thrown by parse_content_range when the total-size component after '/' in the Content-Range header fails integer parsing. The range bounds parsed but the total file size is not a valid unsigned integer, preventing verification that the resumed download matches the expected artifact size.","triggerScenarios":"Content-Range like 'bytes 0-1023/unknown' or 'bytes 0-1023/' from the model server while validate_partial_response validates a partial Parakeet artifact download.","commonSituations":"Servers that legally send '*' for unknown totals on other endpoints but whose responses reach this strict parser; misconfigured CDNs; custom mirrors that write textual sizes ('2.2GB').","solutions":["Fix the server to emit a numeric total, or 'bytes */total' only in 416 responses","Treat total '*' as unknown in the parser and skip total-based verification","Compare downloaded bytes against artifact.exact_bytes from the ArtifactSpec instead of the header total","Test the mirror with curl -r and check the header directly"],"exampleFix":"// before: total must parse or error\nlet total: u64 = total_raw.parse().map_err(|e| anyhow!(\"Invalid Content-Range total: {}\", e))?;\n// after: tolerate '*' unknown total\nlet total: u64 = if total_raw == \"*\" { artifact.exact_bytes } else { total_raw.parse().map_err(|e| anyhow!(\"Invalid Content-Range total: {}\", e))? };","handlingStrategy":"fallback","validationCode":"fn total_is_numeric(v: &str) -> bool { v.trim().rsplit('/').next().map_or(false, |t| t == \"*\" || t.parse::<u64>().is_ok()) }","typeGuard":null,"tryCatchPattern":"match parse_content_range(v) { Err(e) if e.to_string().contains(\"total\") => { log::warn!(\"unknown total, verify against spec size\"); verify_against_artifact_spec(downloaded_len) }, other => other }","preventionTips":["Prefer verifying downloaded size against ArtifactSpec.exact_bytes over header totals","Choose mirrors that always report numeric totals","Probe header format once when configuring a custom mirror"],"tags":["http","content-range","parsing","resumable-download"],"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-14T00:17:10.932Z"}