can1357/oh-my-pi · error · SearchProviderError
Exa MCP request failed (${response.status}): ${errorText}
Error message
Exa MCP request failed (${response.status}): ${errorText} What it means
The Exa MCP endpoint returned a non-2xx HTTP status that was neither classified nor a 429. The provider throws SearchProviderError with the status and the raw response body text embedded in the message.
Source
Thrown at packages/coding-agent/src/web/search/providers/exa.ts:388
params: {
name: "web_search_exa",
arguments: buildExaMcpArgs(params),
},
}),
signal: withHardTimeout(params.signal, params.timeoutMs),
});
if (!response.ok) {
const errorText = await response.text();
const classified = classifyProviderHttpError("exa", response.status, errorText);
if (classified) throw classified;
if (response.status === 429) {
throw new SearchProviderError(
"exa",
"exa: MCP rate limit reached (429); configure an Exa API key for higher limits",
response.status,
);
}
throw new SearchProviderError(
"exa",
`Exa MCP request failed (${response.status}): ${errorText}`,
response.status,
);
}
const mcpResponse = parseSSE(await response.text()) as {
result?: {
content?: Array<{ type: string; text?: string }>;
isError?: boolean;
};
error?: {
code: number;
message: string;
};
} | null;
if (!mcpResponse) {
throw new Error("Failed to parse MCP response");
}View on GitHub (pinned to 9690622007)
Solutions
- Read the status and embedded errorText to identify the failure.
- Retry with backoff for 5xx (transient gateway/service errors).
- Check Exa status page for ongoing incidents.
- Configure an API key and use the REST path if the MCP endpoint is persistently failing.
Defensive patterns
Strategy: retry
Try / catch
try {
const res = await searchExa({ query });
} catch (e) {
if (e instanceof SearchProviderError && e.status >= 500) {
await Bun.sleep(2000); // transient MCP gateway errors usually clear
} else throw e;
} Prevention
- Retry 5xx with backoff; do not retry 4xx
- Watch Exa's status page for MCP incidents
- Keep the REST API (API key) path as a fallback
- Log the embedded errorText to distinguish gateway vs application errors
When it happens
Trigger: callExaMcpSearch request failing with statuses like 400, 401, 500, 502, 503 from the MCP endpoint; classifyProviderHttpError returned no specific error and status !== 429.
Common situations: Exa MCP service outage (5xx); request rejected due to malformed payload (400); proxy/gateway errors between the client and Exa.
Related errors
- Exa API error (${response.status}): ${errorText}
- Failed to parse MCP response
- MCP error: ${mcpResponse.error.message}
- Exa MCP returned an error (falls back to `${message}` when p
- Exa MCP search returned unexpected response shape.
AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31).
Data as JSON: /api/errors/9b6003e055f796ba.
Report an issue: GitHub.