{"record":{"id":"8d27c7d8119cce55","repo":"nikivdev/code","slug":"fix-input-file-is-empty","errorCode":null,"errorMessage":"fix input file is empty: {}","messagePattern":"fix input file is empty: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/fix.rs","lineNumber":75,"sourceCode":"\n    Ok(())\n}\n\nfn resolve_fix_message(parts: &[String]) -> Result<String> {\n    let joined = parts.join(\" \").trim().to_string();\n    if joined.is_empty() {\n        bail!(\"provide a fix message, e.g. `f fix last commit had spotify api leaked`\");\n    }\n\n    let Some(path) = detect_fix_input_file(parts) else {\n        return Ok(joined);\n    };\n\n    let content = fs::read_to_string(&path)\n        .with_context(|| format!(\"failed to read fix input file {}\", path.display()))?;\n    let trimmed = content.trim();\n    if trimmed.is_empty() {\n        bail!(\"fix input file is empty: {}\", path.display());\n    }\n\n    println!(\"Loaded fix context from {}\", path.display());\n    Ok(format!(\n        \"Use this report as the source of truth for what to fix.\\n\\nReport file: {}\\n\\n{}\",\n        path.display(),\n        trimmed\n    ))\n}\n\nfn detect_fix_input_file(parts: &[String]) -> Option<PathBuf> {\n    if parts.len() != 1 {\n        return None;\n    }\n    let raw = parts[0].trim();\n    if raw.is_empty() {\n        return None;\n    }","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/nikivdev/code/blob/a747e741ae92c09071d0ae946ab48488adcff1ce/src/fix.rs#L57-L93","documentation":"Error \"fix input file is empty: {}\" thrown in nikivdev/code.","triggerScenarios":"Thrown at src/fix.rs:75 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"a747e741ae92c09071d0ae946ab48488adcff1ce","analyzedAt":"2026-09-01T22:43:55.719Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}