tinyhumansai/openhuman · error
SearXNG search query cannot be empty
Error message
SearXNG search query cannot be empty
What it means
SearxngClient::search found the query blank after trimming — argument validation before any URL is built. The SearXNG instance is never contacted.
Source
Thrown at src/openhuman/search/tools/searxng.rs:139
timeout_secs: u64,
http_client: reqwest::Client,
) -> Self {
let timeout = timeout_secs.max(1);
Self {
base_url,
max_results: max_results.clamp(1, MAX_RESULTS),
default_language,
timeout_secs: timeout,
http_client,
}
}
/// Execute a SearXNG JSON search and normalize the returned result rows.
pub async fn search(&self, args: SearxngSearchArgs) -> anyhow::Result<SearxngSearchResponse> {
let query = args.query.trim();
if query.is_empty() {
anyhow::bail!("SearXNG search query cannot be empty");
}
let max_results = args
.max_results
.unwrap_or(self.max_results)
.clamp(1, MAX_RESULTS);
let categories = normalize_categories(args.categories)?;
let language = args
.language
.as_deref()
.map(str::trim)
.filter(|value| !value.is_empty())
.unwrap_or_else(|| self.default_language.trim());
let mut url = self.search_endpoint_url()?;
{
let mut pairs = url.query_pairs_mut();
pairs.append_pair("q", query);View on GitHub (pinned to 7491200858)
Solutions
- Re-issue the search with a non-empty query string
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at src/openhuman/search/tools/searxng.rs:139 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of tinyhumansai/openhuman@7491200858 (2026-08-17).
Data as JSON: /api/errors/35016d08369fbfd3.
Report an issue: GitHub.