{"record":{"id":"1b63da90b3078c57","repo":"crewAIInc/crewAI","slug":"status-check-failed-await-status-response-text","errorCode":null,"errorMessage":"Status check failed: {await status_response.text()}","messagePattern":"Status check failed: (.+?)","errorType":"http","errorClass":"BrightDataDatasetToolException","httpStatus":null,"severity":"error","filePath":"lib/crewai-tools/src/crewai_tools/tools/brightdata_tool/brightdata_dataset.py","lineNumber":523,"sourceCode":"                if trigger_response.status != 200:\n                    raise BrightDataDatasetToolException(\n                        f\"Trigger failed: {await trigger_response.text()}\",\n                        trigger_response.status,\n                    )\n                trigger_data = await trigger_response.json()\n                snapshot_id = trigger_data.get(\"snapshot_id\")\n\n            elapsed = 0\n            while elapsed < timeout:\n                await asyncio.sleep(polling_interval)\n                elapsed += polling_interval\n\n                async with session.get(\n                    f\"{BRIGHTDATA_API_URL}/datasets/v3/progress/{snapshot_id}\",\n                    headers=headers,\n                ) as status_response:\n                    if status_response.status != 200:\n                        raise BrightDataDatasetToolException(\n                            f\"Status check failed: {await status_response.text()}\",\n                            status_response.status,\n                        )\n                    status_data = await status_response.json()\n                    if status_data.get(\"status\") == \"ready\":\n                        break\n                    if status_data.get(\"status\") == \"error\":\n                        raise BrightDataDatasetToolException(\n                            f\"Job failed: {status_data}\", 0\n                        )\n            else:\n                raise TimeoutError(\"Polling timed out before job completed.\")\n\n            async with session.get(\n                f\"{BRIGHTDATA_API_URL}/datasets/v3/snapshot/{snapshot_id}\",\n                params={\"format\": output_format},\n                headers=headers,\n            ) as snapshot_response:","sourceCodeStart":505,"sourceCodeEnd":541,"githubUrl":"https://github.com/crewAIInc/crewAI/blob/754d7323beb2fd042e33444a115ea2d5a47193f0/lib/crewai-tools/src/crewai_tools/tools/brightdata_tool/brightdata_dataset.py#L505-L541","documentation":"A BrightDataDatasetToolException raised during the polling loop when GET /datasets/v3/progress/{snapshot_id} returns a non-200 status. The trigger succeeded and a snapshot id exists, but checking job progress failed — typically auth revocation mid-job, a snapshot that expired on Bright Data's side, or a transient server error.","triggerScenarios":"Snapshot id no longer valid (expired/purged on Bright Data), API key deactivated between trigger and poll, transient 5xx from the progress endpoint during a long-running job.","commonSituations":"Long-polling jobs that outlive snapshot retention, rotating credentials mid-run, network instability during polling_interval cycles.","solutions":["Check the exception's status_code: 401/403 means credentials; 404 means the snapshot id is gone — re-trigger the job.","For transient 5xx/429, catch BrightDataDatasetToolException and re-run the whole trigger+poll flow with backoff.","Shorten polling_interval / raise timeout only if the dataset legitimately takes long; prefer retrying the full call."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    result = tool.run(url=url, dataset_type=dataset_type)\nexcept BrightDataDatasetToolException as e:\n    if e.status_code in (429, 500, 502, 503):\n        time.sleep(5)\n        result = tool.run(url=url, dataset_type=dataset_type)  # full re-trigger\n    elif e.status_code == 404:\n        # snapshot gone — must re-trigger, cannot resume\n        result = tool.run(url=url, dataset_type=dataset_type)\n    else:\n        raise","preventionTips":["Expect that progress failures require re-triggering — the snapshot id is not resumable across calls.","Keep job size small enough that trigger+poll completes well within one process lifetime.","Monitor Bright Data status page for outages when polls suddenly fail across many jobs."],"tags":["bright-data","http","polling","snapshot"],"backgroundTag":null,"analyzedSha":"754d7323beb2fd042e33444a115ea2d5a47193f0","analyzedAt":"2026-08-15T04:06:56.746Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}