FlowiseAI/Flowise · error · Error
Arxiv API error: ${response.status} ${response.statusText}
Error message
Arxiv API error: ${response.status} ${response.statusText} What it means
Thrown by ArxivTool.fetchResults when the HTTP response to the Arxiv search endpoint is not ok (non-2xx). The status code and status text are interpolated. Arxiv's export API (http://export.arxiv.org/api/query) is rate-limited and occasionally returns 429 or 5xx, so a non-ok response is treated as a hard failure rather than returning empty results.
Source
Thrown at packages/components/nodes/tools/Arxiv/core.ts:159
})
} else {
// Search by query
// Remove problematic characters that can cause search issues
const cleanedQuery = query.replace(/[:-]/g, '').substring(0, this.maxQueryLength)
searchParams = new URLSearchParams({
search_query: `all:${cleanedQuery}`,
max_results: this.topKResults.toString(),
sortBy: 'relevance',
sortOrder: 'descending'
})
}
const url = `${baseUrl}?${searchParams.toString()}`
this.logger?.info(`[${this.orgId}]: Making Arxiv API call to: ${url}`)
const response = await fetch(url)
if (!response.ok) {
throw new Error(`Arxiv API error: ${response.status} ${response.statusText}`)
}
const xmlText = await response.text()
return this.parseArxivResponse(xmlText)
}
private async downloadAndExtractPdf(arxivId: string): Promise<string> {
// Extract clean arxiv ID from full URL if needed
const cleanId = arxivId.replace('http://arxiv.org/abs/', '').replace('https://arxiv.org/abs/', '')
const pdfUrl = `https://arxiv.org/pdf/${cleanId}.pdf`
this.logger?.info(`[${this.orgId}]: Downloading PDF from: ${pdfUrl}`)
const response = await fetch(pdfUrl)
if (!response.ok) {
throw new Error(`Failed to download PDF: ${response.status} ${response.statusText}`)
}
View on GitHub (pinned to abe4a8601a)
Solutions
- Retry with exponential backoff specifically on 429 and 5xx — Arxiv rate limits are transient.
- Reduce parallelism: serialize Arxiv calls and cap topKResults to what you actually need.
- Set a sensible User-Agent if the runtime allows it; some Arxiv edge nodes reject default fetch UA strings.
- If the error persists, check https://status.arxiv.org for an ongoing outage.
Example fix
// before
const response = await fetch(url)
if (!response.ok) {
throw new Error(`Arxiv API error: ${response.status} ${response.statusText}`)
}
// after: retry on transient codes
async function fetchWithRetry(url: string, attempts = 3) {
for (let i = 0; i < attempts; i++) {
const r = await fetch(url)
if (r.ok || (r.status !== 429 && r.status < 500)) return r
await new Promise((res) => setTimeout(res, 2 ** i * 500))
}
throw new Error(`Arxiv API error after retries: ${url}`)
} Defensive patterns
Strategy: retry
Validate before calling
async function arxivOk(url: string): Promise<boolean> {
const r = await fetch(url, { method: 'GET' })
return r.ok
} Try / catch
async function fetchArxiv(url: string, attempts = 3) {
for (let i = 0; i < attempts; i++) {
const r = await fetch(url)
if (r.ok) return r
if (r.status !== 429 && r.status < 500) {
throw new Error(`Arxiv API error: ${r.status} ${r.statusText}`)
}
await new Promise((res) => setTimeout(res, 2 ** i * 500))
}
throw new Error('Arxiv API error: giving up after retries')
} Prevention
- Serialize Arxiv calls and cap concurrency to stay under the rate limit.
- Cache query results to avoid repeat traffic.
- Monitor Arxiv status page during bulk ingestion.
When it happens
Trigger: HTTP 429 Too Many Requests from Arxiv's per-IP rate limit; 5xx during Arxiv outages; 403 from a proxy/firewall blocking the export endpoint; DNS/TLS errors surfaced as a non-ok response by the runtime.
Common situations: Burst workloads (many agents querying Arxiv in parallel); running from a cloud egress IP that Arxiv throttles aggressively; corporate proxy rewriting the request.
Related errors
- Failed to download PDF: ${response.status} ${response.status
- ${errorMessage}
- HTTP error! status: ${response.status}
- Failed to fetch ${url}: ${error}
- Failed to post ${url}: ${error}
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/5cc28924606eb1bd.
Report an issue: GitHub.