{"record":{"id":"c5e8ad9184ad3e6c","repo":"BerriAI/litellm","slug":"failed-to-poll-operation-response-text","errorCode":null,"errorMessage":"Failed to poll operation: {response.text}","messagePattern":"Failed to poll operation: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/rag/ingestion/vertex_ai_ingestion.py","lineNumber":258,"sourceCode":"        url: Final = f\"{base_url}/v1beta1/{operation_name}\"\n\n        client: Final = get_async_httpx_client(\n            llm_provider=httpxSpecialProvider.RAG,\n            params={\"timeout\": 60.0},\n        )\n\n        for attempt in range(max_retries):\n            response = await client.get(\n                url,\n                headers={\n                    \"Authorization\": f\"Bearer {access_token}\",\n                },\n            )\n\n            if response.status_code != 200:\n                error_msg = f\"Failed to poll operation: {response.text}\"\n                verbose_logger.error(error_msg)\n                raise Exception(error_msg)\n\n            operation_data = response.json()\n\n            if operation_data.get(\"done\"):\n                # Check for errors\n                if \"error\" in operation_data:\n                    error = operation_data[\"error\"]\n                    raise Exception(f\"Operation failed: {error}\")\n\n                # Extract corpus name from response\n                corpus_name = operation_data.get(\"response\", {}).get(\"name\", \"\")\n                if corpus_name:\n                    return corpus_name\n                else:\n                    raise Exception(f\"No corpus name in operation response: {operation_data}\")\n\n            verbose_logger.debug(\"Operation not done yet, attempt %s/%s\", attempt + 1, max_retries)\n            await asyncio.sleep(retry_delay)","sourceCodeStart":240,"sourceCodeEnd":276,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/rag/ingestion/vertex_ai_ingestion.py#L240-L276","documentation":"Raised inside the long-running-operation polling loop when a GET on the Vertex AI operation returns a non-200 status. It signals a transient or auth failure while checking corpus-creation progress, not a completed-but-failed operation.","triggerScenarios":"Thrown at litellm/rag/ingestion/vertex_ai_ingestion.py:258 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the response text; verify credentials and that the operation name is valid, then retry polling."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8","analyzedAt":"2026-08-18T11:44:31.656Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}