FlowiseAI/Flowise · error · Error

Unknown crawl status: ${statusData.status}

Error message

Unknown crawl status: ${statusData.status}

What it means

Thrown by monitorJobStatus when the crawl-status response carries a `status` value not in {'completed','scraping','failed'}. The library's switch has no case for it, so it treats anything new (e.g. 'queued','cancelled','paused') as a hard failure.

Source

Thrown at packages/components/nodes/documentloaders/FireCrawl/FireCrawl.ts:496

    private async monitorJobStatus(jobId: string, headers: AxiosRequestHeaders, checkInterval: number): Promise<CrawlStatusResponse> {
        let isJobCompleted = false
        while (!isJobCompleted) {
            const statusResponse: AxiosResponse = await this.getRequest(this.apiUrl + `/v1/crawl/${jobId}`, headers)
            if (statusResponse.status === 200) {
                const statusData = statusResponse.data as CrawlStatusResponse
                switch (statusData.status) {
                    case 'completed':
                        isJobCompleted = true
                        return statusData
                    case 'scraping':
                    case 'failed':
                        if (statusData.status === 'failed') {
                            throw new Error('Crawl job failed')
                        }
                        await new Promise((resolve) => setTimeout(resolve, Math.max(checkInterval, 2) * 1000))
                        break
                    default:
                        throw new Error(`Unknown crawl status: ${statusData.status}`)
                }
            } else {
                this.handleError(statusResponse, 'check crawl status')
            }
        }
        throw new Error('Failed to monitor job status')
    }

    private async monitorExtractStatus(jobId: string, headers: AxiosRequestHeaders, checkInterval: number): Promise<ExtractStatusResponse> {
        let isJobCompleted = false
        while (!isJobCompleted) {
            const statusResponse: AxiosResponse = await this.getRequest(this.apiUrl + `/v1/extract/${jobId}`, headers)
            if (statusResponse.status === 200) {
                const statusData = statusResponse.data as ExtractStatusResponse
                switch (statusData.status) {
                    case 'completed':
                        isJobCompleted = true
                        return statusData

View on GitHub (pinned to abe4a8601a)

Solutions

  1. Upgrade the FireCrawl node package or patch the switch to handle the new status.
  2. If the status is 'cancelled'/'queued', treat as transient and re-poll or restart the job.
  3. Report the unknown status value to the FireCrawl maintainers with the API version.
  4. Pin the FireCrawl API version until the library catches up.

Example fix

// before
switch (statusData.status) {
  case 'completed': ...
  case 'scraping': case 'failed': ...
  default: throw new Error(`Unknown crawl status: ${statusData.status}`)
}

// after
switch (statusData.status) {
  case 'completed': ...
  case 'scraping': case 'queued': /* poll again */ break
  case 'failed': case 'cancelled': throw new Error(statusData.status)
  default: throw new Error(`Unknown crawl status: ${statusData.status}`)
}
Defensive patterns

Strategy: type-guard

Validate before calling

const known = new Set(['completed','scraping','failed'])
if (!known.has(statusData.status)) console.warn('unhandled crawl status:', statusData.status)

Type guard

type CrawlStatus = 'completed' | 'scraping' | 'failed' | 'cancelled' | 'queued'
function isKnownCrawlStatus(s: string): s is CrawlStatus {
  return ['completed','scraping','failed','cancelled','queued'].includes(s)
}

Try / catch

try { return await app.crawlUrl(url, params) }
catch (e) {
  if (/Unknown crawl status:/.test((e as Error).message)) { await sleep(2000); return app.crawlUrl(url, params) }
  throw e
}

Prevention

When it happens

Trigger: FireCrawl API introduces a new status string for crawl jobs (e.g. 'cancelled' after a TTL, 'queued' before scraping starts, or 'paused'). The local CrawlStatusResponse interface only documents `status: string`.

Common situations: FireCrawl API version bump adds statuses; self-hosted FireCrawl fork returns custom states; long-running crawl that gets queued or cancelled; cancelled jobs from dashboard.

Related errors


AI-assisted analysis of FlowiseAI/Flowise@abe4a8601a (2026-08-12). Data as JSON: /api/errors/b4648947b46e60a6. Report an issue: GitHub.