{"record":{"id":"4e4ab307ae5ffd79","repo":"tinyhumansai/openhuman","slug":"invalid-limit-e","errorCode":null,"errorMessage":"invalid --limit: {e}","messagePattern":"invalid --limit: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/core/memory_cli.rs","lineNumber":325,"sourceCode":"    let mut namespace: Option<String> = None;\n    let mut query: Option<String> = None;\n    let mut limit: u32 = 10;\n    let mut verbose = false;\n    let mut i = 0;\n\n    while i < args.len() {\n        match args[i].as_str() {\n            \"--namespace\" | \"-n\" => {\n                namespace = Some(next_arg(args, &mut i, \"--namespace\")?);\n            }\n            \"--query\" | \"-q\" => {\n                query = Some(next_arg(args, &mut i, \"--query\")?);\n            }\n            \"--limit\" | \"-l\" => {\n                let raw = next_arg(args, &mut i, \"--limit\")?;\n                limit = raw\n                    .parse::<u32>()\n                    .map_err(|e| anyhow::anyhow!(\"invalid --limit: {e}\"))?;\n            }\n            \"-v\" | \"--verbose\" => {\n                verbose = true;\n                i += 1;\n            }\n            \"-h\" | \"--help\" => {\n                println!(\n                    \"Usage: openhuman memory query --namespace <ns> --query <text> [--limit <n>] [-v]\"\n                );\n                return Ok(());\n            }\n            other => return Err(anyhow::anyhow!(\"unknown query arg: {other}\")),\n        }\n    }\n\n    let namespace =\n        namespace.ok_or_else(|| anyhow::anyhow!(\"--namespace is required for query\"))?;\n    let query = query.ok_or_else(|| anyhow::anyhow!(\"--query is required\"))?;","sourceCodeStart":307,"sourceCodeEnd":343,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/core/memory_cli.rs#L307-L343","documentation":"Argument-validation failure in the `openhuman memory query` CLI loop. The value following --limit/-l is parsed as u32; this fires when the user supplies a non-numeric value (e.g. `--limit ten`) or a number outside u32 range. It is a stdin-facing usage error, not an internal fault; the underlying std parse error text is appended to the message.","triggerScenarios":"Thrown at src/core/memory_cli.rs:325 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Pass an integer between 0 and 4294967295 after --limit (e.g. `--limit 25`).","Run `openhuman memory query --help` to see the accepted flag forms.","Check that the next token after --limit is the value, not another flag."],"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"}