{"record":{"id":"eab9023516ee5665","repo":"tinyhumansai/openhuman","slug":"match-conditions-must-be-a-non-empty-array","errorCode":null,"errorMessage":"match_conditions must be a non-empty array","messagePattern":"match_conditions must be a non-empty array","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/parallel.rs","lineNumber":991,"sourceCode":"            },\n            \"required\": [\"objective\", \"entity_type\", \"match_conditions\"]\n        })\n    }\n\n    async fn execute(&self, args: serde_json::Value) -> anyhow::Result<ToolResult> {\n        let objective = args\n            .get(\"objective\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing required parameter: objective\"))?;\n        let entity_type = args\n            .get(\"entity_type\")\n            .and_then(|v| v.as_str())\n            .ok_or_else(|| anyhow::anyhow!(\"Missing required parameter: entity_type\"))?;\n        let match_conditions = args\n            .get(\"match_conditions\")\n            .and_then(|v| v.as_array())\n            .filter(|a| !a.is_empty())\n            .ok_or_else(|| anyhow::anyhow!(\"match_conditions must be a non-empty array\"))?;\n\n        let mut body = json!({\n            \"objective\": objective,\n            \"entityType\": entity_type,\n            \"matchConditions\": match_conditions,\n        });\n        if let Some(g) = args.get(\"generator\").and_then(|v| v.as_str()) {\n            body[\"generator\"] = json!(g);\n        }\n        if let Some(l) = args.get(\"match_limit\").and_then(|v| v.as_u64()) {\n            body[\"matchLimit\"] = json!(l.clamp(5, 1000));\n        }\n\n        tracing::info!(\"[parallel_dataset] entity_type={}\", entity_type);\n\n        match self\n            .client\n            .post::<DatasetResponse>(\"/agent-integrations/parallel/dataset\", &body)","sourceCodeStart":973,"sourceCodeEnd":1009,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/parallel.rs#L973-L1009","documentation":"Argument-validation guard in the Parallel find-entities tool: 'match_conditions' is absent/not an array, or an explicitly empty array (the filter on non-empty arrays makes emptiness fail here too). The schema requires it as the third mandatory parameter defining what qualifies as a match. Malformed model call; nothing is sent to Parallel.","triggerScenarios":"Thrown at src/openhuman/search/tools/parallel.rs:991 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Retry with 'match_conditions' as a non-empty array of condition objects/strings describing match criteria.","At least one condition is mandatory — an empty array cannot identify candidates.","Cross-check the schema's items definition for the expected condition shape."],"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"}