{"record":{"id":"1e99bee19680b8f2","repo":"tinyhumansai/openhuman","slug":"empty-value-for-arg","errorCode":null,"errorMessage":"empty value for {arg}","messagePattern":"empty value for (.+?)","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/core/cli.rs","lineNumber":171,"sourceCode":"        };\n\n        let value = match inline_value {\n            Some(value) => value,\n            None => {\n                i += 1;\n                let value = args\n                    .get(i)\n                    .map(String::as_str)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for {arg}\"))?;\n                if value.starts_with('-') {\n                    return Err(anyhow::anyhow!(\"missing value for {arg}\"));\n                }\n                value\n            }\n        };\n        let value = value.trim();\n        if value.is_empty() {\n            return Err(anyhow::anyhow!(\"empty value for {arg}\"));\n        }\n        match target {\n            Some(\"model\") => parsed.model = Some(value.to_string()),\n            Some(\"provider\") => parsed.provider = Some(value.to_string()),\n            _ => unreachable!(\"launch option target is fixed above\"),\n        }\n        i += 1;\n    }\n\n    parsed.args = args[i..].to_vec();\n    Ok(parsed)\n}\n\n#[cfg(feature = \"tui\")]\nfn run_tui_from_cli(args: &[String]) -> Result<()> {\n    crate::tui::run_from_cli(args)\n}\n","sourceCodeStart":153,"sourceCodeEnd":189,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/core/cli.rs#L153-L189","documentation":"Validation guard in the shared flag parser: the flag's value was present but trimmed to the empty string (e.g. `--model=` or a whitespace-only next argument), which is rejected rather than silently applying an empty model/provider.","triggerScenarios":"Thrown at src/core/cli.rs:171 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-empty value for the flag","Remove the flag entirely if the default should be used"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"749120085864ce16e0f273c7b86fac7740b39c5b","analyzedAt":"2026-08-17T21:21:45.363Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}