{"record":{"id":"60a1df0a4b539a8e","repo":"tinyhumansai/openhuman","slug":"missing-value-for-method","errorCode":null,"errorMessage":"missing value for --method","messagePattern":"missing value for --method","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/cli.rs","lineNumber":466,"sourceCode":"/// Handles the `call` subcommand to invoke a JSON-RPC method directly from the CLI.\n///\n/// This is used for one-off commands and debugging, bypassing the HTTP transport\n/// and calling the internal `invoke_method` directly.\n///\n/// # Arguments\n///\n/// * `args` - Command-line arguments specifying the method and parameters.\nfn run_call_command(args: &[String]) -> Result<()> {\n    let mut method: Option<String> = None;\n    let mut params = \"{}\".to_string();\n\n    let mut i = 0usize;\n    while i < args.len() {\n        match args[i].as_str() {\n            \"--method\" => {\n                method = Some(\n                    args.get(i + 1)\n                        .ok_or_else(|| anyhow::anyhow!(\"missing value for --method\"))?\n                        .clone(),\n                );\n                i += 2;\n            }\n            \"--params\" => {\n                params = args\n                    .get(i + 1)\n                    .ok_or_else(|| anyhow::anyhow!(\"missing value for --params\"))?\n                    .clone();\n                i += 2;\n            }\n            \"-h\" | \"--help\" => {\n                println!(\"Usage: openhuman call --method <name> [--params '<json>']\");\n                return Ok(());\n            }\n            other => return Err(anyhow::anyhow!(\"unknown call arg: {other}\")),\n        }\n    }","sourceCodeStart":448,"sourceCodeEnd":484,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/core/cli.rs#L448-L484","documentation":"CLI argument parsing in run_call_command (direct in-process JSON-RPC invocation for debugging): `--method` was passed with no following value. Usage error; supply the RPC method name, e.g. `--method config.get`. No call was attempted.","triggerScenarios":"Thrown at src/core/cli.rs:466 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply the method name, e.g. `openhuman call --method agent.list_agents`","Check `openhuman call --help` for the expected syntax"],"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"}