{"record":{"id":"bfb46b6698f09da0","repo":"tinyhumansai/openhuman","slug":"searxng-base-url-cannot-be-empty","errorCode":null,"errorMessage":"SearXNG base_url cannot be empty","messagePattern":"SearXNG base_url cannot be empty","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/openhuman/search/tools/searxng.rs","lineNumber":211,"sourceCode":"\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('/');\n        if base.is_empty() {\n            anyhow::bail!(\"SearXNG base_url cannot be empty\");\n        }\n        let endpoint = if base.ends_with(\"/search\") {\n            base.to_string()\n        } else {\n            format!(\"{base}/search\")\n        };\n        reqwest::Url::parse(&endpoint)\n            .with_context(|| format!(\"invalid SearXNG base_url `{}`\", self.base_url))\n    }\n\n    fn render_markdown(response: &SearxngSearchResponse) -> String {\n        if response.results.is_empty() {\n            return format!(\"No SearXNG results for `{}`.\", response.query);\n        }\n\n        let mut out = format!(\"# SearXNG results for `{}`\\n\", response.query);\n        for (index, result) in response.results.iter().enumerate() {\n            out.push_str(&format!(","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/tinyhumansai/openhuman/blob/749120085864ce16e0f273c7b86fac7740b39c5b/src/openhuman/search/tools/searxng.rs#L193-L229","documentation":"search_endpoint_url found the configured base_url empty — the SearXNG client was constructed without an instance URL, so no search URL can be formed. Configuration omission, not an instance failure.","triggerScenarios":"Thrown at src/openhuman/search/tools/searxng.rs:211 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set the SearXNG instance base_url in the search-engine settings","Choose a different default search engine if no instance is configured"],"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"}