Budibase/budibase · error
Exa error: ${response.status} ${response.statusText} - ${err
Error message
Exa error: ${response.status} ${response.statusText} - ${errorBody} What it means
createExaTool's fetch wrapper throws this when the Exa search API responds with a non-OK HTTP status, embedding the status, statusText and raw error body. It surfaces upstream Exa API failures to the agent as tool errors.
Source
Thrown at packages/server/src/ai/tools/search/exa.ts:45
tool: tool({
description: "Search the web using Exa",
inputSchema: exaSearchParams,
execute: async args => {
const response = await fetch("https://api.exa.ai/search", {
method: "POST",
headers: {
Authorization: `Bearer ${apiKey}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
query: args.query,
num_results: args.num_results,
}),
})
if (!response.ok) {
const errorBody = await response.text()
throw new Error(
`Exa error: ${response.status} ${response.statusText} - ${errorBody}`
)
}
return response.json()
},
}),
})
View on GitHub (pinned to a81a902e9a)
Solutions
- Verify the Exa API key is set and valid
- Inspect the error body for the exact API error and fix request parameters
- Implement backoff/retry for 429/5xx responses
- Check Exa status page for outages
Example fix
// before
throw new Error(`Exa error: ${response.status} ... - {"error":"Invalid API key"}`)
// after
// set correct key before creating tool
process.env.EXA_API_KEY = "<valid key>" Defensive patterns
Strategy: retry
Validate before calling
if (!process.env.EXA_API_KEY) throw new Error("EXA_API_KEY not configured") Try / catch
try { await exaTool.run(args) } catch (e) { if (e.message.startsWith("Exa error:")) { const status = parseInt(e.message); if (status === 429 || status >= 500) await retryWithBackoff(); else surfaceToAgent(e) } } Prevention
- Validate EXA_API_KEY at startup
- Add exponential backoff for 429/5xx
- Keep request payloads within Exa API limits
When it happens
Trigger: Exa API returns 4xx/5xx — invalid or missing API key (401), bad request params (400), rate limiting (429), or server errors (5xx).
Common situations: Missing/expired EXA_API_KEY; exceeded rate limits; malformed query parameters; Exa outage.
Related errors
- Parallel error: ${response.status} ${response.statusText}
- OIDC Config contents invalid
- Unexpected response when fetching openid-configuration: ${re
- unexpected response ${response.statusText}
- Unexpected response ${response.statusText}
AI-assisted analysis of Budibase/budibase@a81a902e9a (2026-08-29).
Data as JSON: /api/errors/b328c2f59f701f3f.
Report an issue: GitHub.