FlowiseAI/Flowise · error · Error
${resp.statusText}
Error message
${resp.statusText} What it means
Thrown by Searxng._call when the POST to the SearxNG /search endpoint returns a non-ok response. Only the raw statusText is reported (no status code), which makes diagnosis harder than the Requests tools. The request has a 5-second AbortSignal timeout, so a slow SearxNG also surfaces here as a network/timeout error path.
Source
Thrown at packages/components/nodes/tools/Searxng/Searxng.ts:304
const searchParams = new URLSearchParams(nonUndefinedParams)
return `${baseUrl}/${path}?${searchParams}`
}
async _call(input: string): Promise<string> {
const queryParams = {
q: input,
...this.params
}
const url = this.buildUrl('search', queryParams, this.apiBase as string)
const resp = await secureFetch(url, {
method: 'POST',
headers: this.headers,
signal: AbortSignal.timeout(5 * 1000) as any // node-fetch AbortSignal type predates native AbortSignal
})
if (!resp.ok) {
throw new Error(resp.statusText)
}
const res: SearxngResults = await resp.json()
if (!res.results.length && !res.answers.length && !res.infoboxes.length && !res.suggestions.length) {
return 'No good results found.'
} else if (res.results.length) {
const response: string[] = []
res.results.forEach((r) => {
response.push(
JSON.stringify({
title: r.title || '',
link: r.url || '',
snippet: r.content || ''
})
)
})View on GitHub (pinned to abe4a8601a)
Solutions
- Confirm the SearxNG instance is up: `curl -X POST <apiBase>/search -d 'q=test&format=json'`.
- Ensure apiBase is the API base (often ending without /search); the tool appends the path via buildUrl.
- If the instance is slow, raise capacity or reduce query load (the 5s timeout is fixed in source).
- Check SearxNG logs for the rejected query (e.g. disabled engines, blocked output format).
Example fix
// before (only statusText surfaced)
if (!resp.ok) throw new Error(resp.statusText)
// after (include status code and body for diagnosis)
if (!resp.ok) {
const detail = await resp.text().catch(() => '')
throw new Error(`SearxNG ${resp.status} ${resp.statusText}: ${detail.slice(0, 300)}`)
} Defensive patterns
Strategy: retry
Validate before calling
async function safeSearxng(tool: any, input: string, maxRetries = 2) {
for (let attempt = 0; attempt <= maxRetries; attempt++) {
try { return await tool._call(input) }
catch (e) {
const transient = /timeout|aborted|econn|reset|5\d\d/i.test((e as Error).message)
if (!transient || attempt === maxRetries) throw e
await new Promise((r) => setTimeout(r, 2 ** attempt * 1000))
}
}
} Type guard
const isSearxngTimeout = (e: unknown): boolean => /timeout|aborted|AbortError/i.test(e instanceof Error ? e.message : String(e))
Try / catch
try { return await tool._call(input) }
catch (e) {
const msg = (e as Error).message
if (/timeout|aborted/i.test(msg)) throw new Error('SearxNG request timed out (>5s) — reduce load or check instance')
if (/not found|404/i.test(msg)) throw new Error('SearxNG API base path is wrong')
throw e
} Prevention
- Health-check the SearxNG instance before running flows (`curl -X POST <apiBase>/search`).
- Use the API base URL (not the UI URL) for apiBase.
- Treat the 5-second timeout as a hard ceiling — keep queries light.
- Monitor SearxNG engine status; some engines failing can return non-ok.
When it happens
Trigger: SearxNG returns 4xx/5xx; SearxNG is down or unreachable; request exceeds the 5s timeout (abort); wrong apiBase path; SearxNG behind a proxy that returns an error page.
Common situations: Self-hosted SearxNG instance not running; apiBase points to the UI URL instead of the API base; SearxNG rate-limits or blocks the request; network latency triggers the 5s abort.
Related errors
- ${errorMessage}
- HTTP error! status: ${response.status}
- Failed to fetch ${url}: ${error}
- Failed to post ${url}: ${error}
- Azure Rerank API call failed: ${error.message}
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/464a6983b802c727.
Report an issue: GitHub.