{"record":{"id":"be462c195c74fcd7","repo":"tinyhumansai/openhuman","slug":"query-cannot-be-empty","errorCode":null,"errorMessage":"query cannot be empty","messagePattern":"query cannot be empty","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"src/openhuman/memory/tools/recall.rs","lineNumber":74,"sourceCode":"        })\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        let namespace = args\n            .get(\"namespace\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing 'namespace' parameter\"))?\n            .trim();\n        if namespace.is_empty() {\n            return Err(anyhow::anyhow!(\"namespace cannot be empty\"));\n        }\n        let query = args\n            .get(\"query\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing 'query' parameter\"))?\n            .trim();\n        if query.is_empty() {\n            return Err(anyhow::anyhow!(\"query cannot be empty\"));\n        }\n\n        #[allow(clippy::cast_possible_truncation)]\n        let limit = args\n            .get(\"limit\")\n            .and_then(serde_json::Value::as_u64)\n            .map_or(5, |v| v as usize);\n\n        // Search with the user query only. Prefixing `namespace` into the query\n        // string would add a redundant token matching almost every row. Instead,\n        // namespace scoping belongs in RecallOpts so the backend restricts the\n        // search to the correct namespace column.\n        let recall_opts = crate::openhuman::memory::api::recall::OwnedRecallOpts {\n            namespace: Some(namespace.to_string()),\n            ..Default::default()\n        };\n        let guard = active_memory_guard()\n            .await","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/memory/tools/recall.rs#L56-L92","documentation":"Empty-value guard in the memory recall tool's execute: `query` was present and a string but trimmed to empty (namespace checks already passed). A blank query would match nothing useful, so it is refused before the search; supply non-empty namespace and query.","triggerScenarios":"Thrown at src/openhuman/memory/tools/recall.rs:74 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Provide a non-blank search query","Avoid whitespace-only queries from templated prompts"],"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-14T00:17:10.932Z"}