{"record":{"id":"d92037af0d8c7a49","repo":"tinyhumansai/openhuman","slug":"missing-required-parameter-key","errorCode":null,"errorMessage":"Missing required parameter: {key}","messagePattern":"Missing required parameter: (.+?)","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/tinyfish.rs","lineNumber":32,"sourceCode":"use crate::openhuman::integrations::IntegrationClient;\nuse crate::openhuman::tools::traits::{PermissionLevel, Tool, ToolCategory, ToolResult};\nuse async_trait::async_trait;\nuse serde::Deserialize;\nuse serde_json::json;\nuse std::sync::Arc;\n\nfn truncate_chars(s: &str, max_chars: usize) -> (&str, bool) {\n    match s.char_indices().nth(max_chars) {\n        Some((byte_idx, _)) => (&s[..byte_idx], true),\n        None => (s, false),\n    }\n}\n\nfn non_empty_string<'a>(args: &'a serde_json::Value, key: &str) -> anyhow::Result<&'a str> {\n    args.get(key)\n        .and_then(|v| v.as_str())\n        .filter(|s| !s.trim().is_empty())\n        .ok_or_else(|| anyhow::anyhow!(\"Missing required parameter: {key}\"))\n}\n\nfn optional_string<'a>(args: &'a serde_json::Value, key: &str) -> Option<&'a str> {\n    args.get(key)\n        .and_then(|v| v.as_str())\n        .filter(|s| !s.trim().is_empty())\n}\n\n#[derive(Debug, Deserialize)]\nstruct TinyFishSearchResponse {\n    #[serde(default)]\n    results: Vec<TinyFishSearchResult>,\n    #[serde(default)]\n    total_results: Option<u64>,\n    #[serde(rename = \"costUsd\", default)]\n    cost_usd: Option<f64>,\n}\n","sourceCodeStart":14,"sourceCodeEnd":50,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/tinyfish.rs#L14-L50","documentation":"Shared argument-validation helper (non_empty_string) in the Tinyfish search tool: a required string parameter identified by {key} is missing from the args object, is not a string, or is empty. This generic guard backs multiple required params of the tool, and the faulting input is whichever key the message names.","triggerScenarios":"Thrown at src/openhuman/search/tools/tinyfish.rs:32 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Supply the parameter named in the message as a non-empty string in the tool arguments.","Check model-generated arguments for omitted or wrong-typed fields.","Validate arguments against the tool schema before invocation."],"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"}