{"record":{"id":"ab90697b6df7bd0c","repo":"unclecode/crawl4ai","slug":"request-failed","errorCode":null,"errorMessage":"Request failed","messagePattern":"Request failed","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"info","filePath":"deploy/docker/static/playground/index.html","lineNumber":754,"sourceCode":"                let response, responseData;\n                const useStreamOverride = (endpoint === 'crawl') && shouldUseStream(payload);\n\n                if (endpoint === 'llm') {\n                    // Special handling for LLM endpoint which uses URL pattern: /llm/{encoded_url}?q={query}\n                    const url = urls[0];\n                    const encodedUrl = encodeURIComponent(url);\n                    // Get the question from the LLM-specific input\n                    const question = document.getElementById('llm-question').value.trim() || \"What is this page about?\";\n                    \n                    response = await authFetch(`${api}/${encodedUrl}?q=${encodeURIComponent(question)}`, {\n                        method: 'GET',\n                        headers: { 'Accept': 'application/json' }\n                    });\n                    responseData = await response.json();\n                    const time = Math.round(performance.now() - startTime);\n                    if (!response.ok) {\n                        updateStatus('error', time);\n                        throw new Error(responseData.error || 'Request failed');\n                    }\n                    updateStatus('success', time);\n                    document.querySelector('#response-content code').textContent = JSON.stringify(responseData, null, 2);\n                    document.querySelector('#response-content code').className = 'json hljs';\n                    forceHighlightElement(document.querySelector('#response-content code'));\n                } else if (endpoint === 'crawl_stream' || useStreamOverride) {\n                    // Stream processing - now handled directly by /crawl endpoint\n                    response = await authFetch(api, {\n                        method: 'POST',\n                        headers: { 'Content-Type': 'application/json' },\n                        body: JSON.stringify(payload)\n                    });\n\n                    const reader = response.body.getReader();\n                    let text = '';\n                    let maxMemory = 0;\n\n                    while (true) {","sourceCodeStart":736,"sourceCodeEnd":772,"githubUrl":"https://github.com/unclecode/crawl4ai/blob/7e801521428ee12509994d39151006f64055ebe3/deploy/docker/static/playground/index.html#L736-L772","documentation":"ArtifactNotFound raised as the fall-through when the id is well-formed but no file with any known extension exists for it (or every candidate hit FileNotFoundError). This closes the loop of the opaque-not-found design: valid-but-unknown ids, expired ids, and malformed ids all surface identically.","triggerScenarios":"GETing /artifact/{valid-hex-id} for an id that was never issued (fabricated), was already expired-and-reaped, or whose underlying file was deleted — the loop over _KIND extensions completes without a match.","commonSituations":"Random/forged ids probing the API; artifacts aged out between listing and fetch; store directory wiped/recreated (container recreation without a persistent volume).","solutions":["Re-run the crawl to regenerate the artifact — a well-formed but unknown id cannot be recovered","Persist the crawl output (or the artifact bytes) in your own storage at generation time if it must survive","Mount a persistent volume for the artifact dir if container restarts are wiping the store"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":"def is_valid_artifact_id(a):\n    return isinstance(a, str) and len(a) == 32 and all(c in \"0123456789abcdef\" for c in a)","tryCatchPattern":"try:\n    path, mime = resolve_artifact(artifact_id)\nexcept ArtifactNotFound:\n    log.info(\"artifact %s unknown/expired; regenerating\", artifact_id)\n    return await regenerate(...)  # only recovery path","preventionTips":["Persist artifact bytes or crawl outputs at generation time","Use persistent volumes for the artifact dir across container restarts","Don't cache artifact ids beyond their TTL"],"tags":["artifacts","not-found","ephemeral-storage"],"backgroundTag":null,"analyzedSha":"7e801521428ee12509994d39151006f64055ebe3","analyzedAt":"2026-08-14T20:46:20.673Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}