{"record":{"id":"d7007b6c80367650","repo":"tinyhumansai/openhuman","slug":"unsupported-searxng-category-other-expected-w","errorCode":null,"errorMessage":"unsupported SearXNG category `{other}`; expected web, news, or images","messagePattern":"unsupported SearXNG category `(.+?)`; expected web, news, or images","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/searxng.rs","lineNumber":331,"sourceCode":"            result.markdown_formatted = Some(markdown);\n        }\n        Ok(result)\n    }\n}\n\n/// Normalize user-facing category aliases into SearXNG category names.\npub fn normalize_categories(categories: Vec<String>) -> anyhow::Result<Vec<String>> {\n    let mut normalized = Vec::new();\n    for category in categories {\n        let trimmed = category.trim();\n        if trimmed.is_empty() {\n            continue;\n        }\n        let mapped = match trimmed.to_ascii_lowercase().as_str() {\n            \"web\" | \"general\" => \"general\",\n            \"news\" => \"news\",\n            \"images\" => \"images\",\n            other => anyhow::bail!(\n                \"unsupported SearXNG category `{other}`; expected web, news, or images\"\n            ),\n        };\n        if !normalized.iter().any(|existing| existing == mapped) {\n            normalized.push(mapped.to_string());\n        }\n    }\n    Ok(normalized)\n}\n\nfn normalize_results(raw: RawSearxngResponse, max_results: usize) -> Vec<SearxngSearchResult> {\n    raw.results\n        .into_iter()\n        .filter_map(|item| {\n            let url = item.url.unwrap_or_default().trim().to_string();\n            if url.is_empty() {\n                return None;\n            }","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/searxng.rs#L313-L349","documentation":"normalize_categories hit a category alias that maps to none of web/general, news, images after lowercasing and trimming — unknown vocabulary from the tool caller. Empty entries are skipped, so this only fires on a real unrecognized word.","triggerScenarios":"Thrown at src/openhuman/search/tools/searxng.rs:331 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Use one of the supported categories: web, news, or images","Drop the category to fall back to the default"],"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-14T05:17:10.506Z"}