diegosouzapw/OmniRoute · error · WebSearchExecutionError
Search failed
Error message
Search failed
What it means
Upstream execution failure in executeWebSearch(): handleSearch() reported result.success === false or returned no data after the selected provider was called. The message 'Search failed' is the generic fallback — the specific provider error text is used instead whenever result.error is set. Default HTTP status is 502.
Solutions
- Inspect result.error / logs for the underlying provider failure (rate limit, auth, upstream outage).
- Retry the query — the cache coalescer does not cache failures, and transient provider errors often clear.
- Try a different provider via the 'provider' field if the selected one is persistently failing.
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at src/lib/search/executeWebSearch.ts:289 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/3517c9116d553812.
Report an issue: GitHub.
Appendix: source
Thrown at src/lib/search/executeWebSearch.ts:289
searchType,
country: input.country,
language: input.language,
timeRange: input.time_range,
offset: input.offset,
domainFilter: buildDomainFilter(input.filters),
contentOptions: input.content,
strictFilters: input.strict_filters,
providerOptions: input.provider_options,
credentials,
alternateProvider: alternateProviderId,
alternateCredentials,
log,
connectionId: credentials?.connectionId || undefined,
apiKeyId: input.apiKeyId || undefined,
});
if (!result.success || !result.data) {
throw new WebSearchExecutionError(result.error || "Search failed", result.status || 502);
}
return result.data;
});
if (!cached && input.apiKeyId && input.apiKeyId !== "local" && data.usage?.search_cost_usd > 0) {
try {
recordCost(input.apiKeyId, data.usage.search_cost_usd);
} catch (error: any) {
log.warn("SEARCH", `Cost recording failed: ${error?.message || String(error)}`);
}
}
return { data, cached };
}
View on GitHub (pinned to a179ffed5b)