{"record":{"id":"54b9571296620465","repo":"tinyhumansai/openhuman","slug":"searxng-returned-status-detail","errorCode":null,"errorMessage":"SearXNG returned {status}: {detail}","messagePattern":"SearXNG returned (.+?): (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/searxng.rs","lineNumber":191,"sourceCode":"        );\n\n        let response = self\n            .http_client\n            .get(url.clone())\n            .timeout(Duration::from_secs(self.timeout_secs))\n            .send()\n            .await\n            .map_err(|err| {\n                tracing::warn!(error = %err, \"[searxng] request failed\");\n                anyhow::anyhow!(\"SearXNG request failed: {err}\")\n            })?;\n\n        let status = response.status();\n        if !status.is_success() {\n            let body = response.text().await.unwrap_or_default();\n            let detail = utf8_safe_prefix_at_byte_boundary(&body, 500);\n            tracing::warn!(status = %status, \"[searxng] non-2xx response: {detail}\");\n            anyhow::bail!(\"SearXNG returned {status}: {detail}\");\n        }\n\n        let raw: RawSearxngResponse = response.json().await.map_err(|err| {\n            tracing::warn!(error = %err, \"[searxng] failed to parse JSON response\");\n            anyhow::anyhow!(\"Failed to parse SearXNG response: {err}\")\n        })?;\n\n        let results = normalize_results(raw, max_results);\n        tracing::debug!(result_count = results.len(), \"[searxng] search complete\");\n\n        Ok(SearxngSearchResponse {\n            query: query.to_string(),\n            results,\n        })\n    }\n\n    fn search_endpoint_url(&self) -> anyhow::Result<reqwest::Url> {\n        let base = self.base_url.trim().trim_end_matches('/');","sourceCodeStart":173,"sourceCodeEnd":209,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/searxng.rs#L173-L209","documentation":"The SearXNG instance answered a non-success HTTP status; {detail} carries a UTF-8-safe 500-char prefix of the body. For a self-hosted instance this usually means a bad base_url, a missing format=json setting, or the instance refusing the bot.","triggerScenarios":"Thrown at src/openhuman/search/tools/searxng.rs:191 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Verify the instance allows the `search` endpoint with JSON format enabled","Fix the configured base_url if it points at the HTML UI","Retry for transient gateway errors"],"exampleFix":null,"handlingStrategy":"retry","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"}