FlowiseAI/Flowise · warning · Error
Firecrawl: Failed to search. Warning: ${response.warning}
Error message
Firecrawl: Failed to search. Warning: ${response.warning} What it means
Thrown by FireCrawlLoader.load() in search mode when app.search resolves but the response has `success: false`. Embeds the upstream `warning` field. This is the loader-level echo of [122] — note app.search itself throws [122]/[123], so reaching this line is rare.
Source
Thrown at packages/components/nodes/documentloaders/FireCrawl/FireCrawl.ts:585
this.apiKey = apiKey
this.url = url
this.query = query
this.mode = mode
this.params = params
this.apiUrl = apiUrl || 'https://api.firecrawl.dev'
}
public async load(): Promise<DocumentInterface[]> {
const app = new FirecrawlApp({ apiKey: this.apiKey, apiUrl: this.apiUrl })
let firecrawlDocs: FirecrawlDocument[]
if (this.mode === 'search') {
if (!this.query) {
throw new Error('Firecrawl: Query is required for search mode')
}
const response = await app.search({ query: this.query, ...this.params })
if (!response.success) {
throw new Error(`Firecrawl: Failed to search. Warning: ${response.warning}`)
}
// Convert search results to FirecrawlDocument format
firecrawlDocs = (response.data || []).map((result) => ({
markdown: result.description,
metadata: {
title: result.title,
sourceURL: result.url,
description: result.description
}
}))
} else if (this.mode === 'scrape') {
if (!this.url) {
throw new Error('Firecrawl: URL is required for scrape mode')
}
const response = await app.scrapeUrl(this.url, this.params)
if (!response.success) {
throw new Error(`Firecrawl: Failed to scrape URL. Error: ${response.error}`)View on GitHub (pinned to abe4a8601a)
Solutions
- Inspect response.warning for the upstream reason.
- Retry the search with a simpler query or relaxed filters.
- If using a mock, return `{ success: true, data: [...] }` from your test double.
- Patch the duplicate check to log rather than throw if you want best-effort behavior.
Example fix
// before
const response = await app.search({ query: this.query, ...this.params })
if (!response.success) throw new Error(`Firecrawl: Failed to search. Warning: ${response.warning}`)
// after
const response = await app.search({ query: this.query, ...this.params })
if (!response.success) {
console.warn('Firecrawl search soft-failed:', response.warning)
firecrawlDocs = []
} Defensive patterns
Strategy: fallback
Validate before calling
const query = (params.query || '').trim()
if (!query) throw new Error('search requires a query') Type guard
function isSearchSuccess(r: SearchResponse | undefined): r is SearchResponse & { success: true } {
return !!r && r.success === true
} Try / catch
let docs: DocumentInterface[] = []
try { docs = await loader.load() }
catch (e) { if (/Failed to search/.test((e as Error).message)) return []; throw e } Prevention
- Cache prior successful results to ride out soft failures.
- Log response.warning for diagnosis.
- Use this as best-effort; surface warnings to the user.
When it happens
Trigger: app.search returns (without throwing) a SearchResponse where `success === false`. In practice app.search throws [122] before returning, so this branch is a defensive duplicate. If reached, it indicates a future refactor where app.search stops throwing on failure.
Common situations: Library refactor decouples app.search throwing from the success flag; mocked/stubbed FirecrawlApp in tests returning `{ success: false }`.
Related errors
- Firecrawl: Failed to scrape URL. Error: ${response.error}
- Search request failed: ${searchResponse.warning || 'Unknown
- Firecrawl: Query is required for search mode
- Firecrawl API key not set. You can set it as FIRECRAWL_API_K
- Firecrawl: URL is required for scrape mode
AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12).
Data as JSON: /api/errors/a5c877fa5f4b7f94.
Report an issue: GitHub.