{"record":{"id":"3d81f64be8af68a2","repo":"FlowiseAI/Flowise","slug":"failed-to-monitor-extract-status","errorCode":null,"errorMessage":"Failed to monitor extract status","messagePattern":"Failed to monitor extract status","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"info","filePath":"packages/components/nodes/documentloaders/FireCrawl/FireCrawl.ts","lineNumber":529,"sourceCode":"                switch (statusData.status) {\n                    case 'completed':\n                        isJobCompleted = true\n                        return statusData\n                    case 'processing':\n                    case 'failed':\n                        if (statusData.status === 'failed') {\n                            throw new Error('Extract job failed')\n                        }\n                        await new Promise((resolve) => setTimeout(resolve, Math.max(checkInterval, 2) * 1000))\n                        break\n                    default:\n                        throw new Error(`Unknown extract status: ${statusData.status}`)\n                }\n            } else {\n                this.handleError(statusResponse, 'check extract status')\n            }\n        }\n        throw new Error('Failed to monitor extract status')\n    }\n\n    private handleError(response: AxiosResponse, action: string): void {\n        if ([402, 408, 409, 500].includes(response.status)) {\n            const errorMessage: string = response.data.error || 'Unknown error occurred'\n            throw new Error(`Failed to ${action}. Status code: ${response.status}. Error: ${errorMessage}`)\n        } else {\n            throw new Error(`Unexpected error occurred while trying to ${action}. Status code: ${response.status}`)\n        }\n    }\n}\n\n// FireCrawl Loader\ninterface FirecrawlLoaderParameters {\n    url?: string\n    query?: string\n    apiKey?: string\n    apiUrl?: string","sourceCodeStart":511,"sourceCodeEnd":547,"githubUrl":"https://github.com/FlowiseAI/Flowise/blob/abe4a8601a058047b350c260676826e21dd14101/packages/components/nodes/documentloaders/FireCrawl/FireCrawl.ts#L511-L547","documentation":"Defensive post-loop throw in monitorExtractStatus. Like [126], the loop only exits via return or throw, so this line is effectively unreachable and exists to satisfy TypeScript's exhaustive-return check.","triggerScenarios":"Unreachable in the shipping code; would require a future refactor that breaks the in-loop return/throw invariant.","commonSituations":"Not observed in production; surfaces only after manual edits to the switch.","solutions":["Treat an occurrence as a regression in monitorExtractStatus and audit the control flow."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":"try { return await app.extract(req, true, pollInterval) }\ncatch (e) { /* unreachable per current code; treat as bug */ throw e }","preventionTips":["Treat an occurrence as a regression in monitorExtractStatus.","No runtime mitigation needed; the line should never fire."],"tags":["firecrawl","extract","unreachable","defensive"],"backgroundTag":null,"analyzedSha":"abe4a8601a058047b350c260676826e21dd14101","analyzedAt":"2026-08-12T16:04:40.823Z","schemaVersion":2},"datasetVersion":"2026-08-12T18:17:37.767Z"}