tinyhumansai/openhuman · error

SearXNG request failed: {err}

Error message

SearXNG request failed: {err}

What it means

Transport-failure mapping in SearxngTool::search: the reqwest GET /search call to the SearXNG instance failed before a response status could be read — instance down, DNS/connection failure, TLS problem, or the per-request timeout (self.timeout_secs) fired. The reqwest error is logged at warn and rewrapped; this is distinct from a non-2xx status, which is handled in the following block.

Source

Thrown at src/openhuman/search/tools/searxng.rs:183

        }

        tracing::debug!(
            query_len = query.chars().count(),
            max_results,
            categories = ?categories,
            timeout_secs = self.timeout_secs,
            "[searxng] GET /search"
        );

        let response = self
            .http_client
            .get(url.clone())
            .timeout(Duration::from_secs(self.timeout_secs))
            .send()
            .await
            .map_err(|err| {
                tracing::warn!(error = %err, "[searxng] request failed");
                anyhow::anyhow!("SearXNG request failed: {err}")
            })?;

        let status = response.status();
        if !status.is_success() {
            let body = response.text().await.unwrap_or_default();
            let detail = utf8_safe_prefix_at_byte_boundary(&body, 500);
            tracing::warn!(status = %status, "[searxng] non-2xx response: {detail}");
            anyhow::bail!("SearXNG returned {status}: {detail}");
        }

        let raw: RawSearxngResponse = response.json().await.map_err(|err| {
            tracing::warn!(error = %err, "[searxng] failed to parse JSON response");
            anyhow::anyhow!("Failed to parse SearXNG response: {err}")
        })?;

        let results = normalize_results(raw, max_results);
        tracing::debug!(result_count = results.len(), "[searxng] search complete");

View on GitHub (pinned to 7491200858)

Solutions

  1. Verify the configured SearXNG base URL is correct and the instance is up (curl its /search endpoint).
  2. Retry; transient network errors often resolve.
  3. If timeouts recur, raise the timeout or check proxy/firewall paths to the instance.
Defensive patterns

Strategy: retry

When it happens

Trigger: Thrown at src/openhuman/search/tools/searxng.rs:183 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/a31748456cd0cc3b. Report an issue: GitHub.