{"record":{"id":"d7fe045575e9bee4","repo":"BerriAI/litellm","slug":"operation-failed-error","errorCode":null,"errorMessage":"Operation failed: {error}","messagePattern":"Operation failed: (.+?)","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"litellm/rag/ingestion/vertex_ai_ingestion.py","lineNumber":266,"sourceCode":"            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)\n\n        raise Exception(f\"Operation timed out after {max_retries} attempts\")\n\n    async def _upload_file_to_corpus(\n        self,\n        rag_corpus_id: str,\n        filename: str,\n        file_content: bytes,","sourceCodeStart":248,"sourceCodeEnd":284,"githubUrl":"https://github.com/BerriAI/litellm/blob/77b7c6c40c0c5aa5fbcb1d6a1825ac39ca8829b8/litellm/rag/ingestion/vertex_ai_ingestion.py#L248-L284","documentation":"Vertex AI RAG ingestion polling result: the long-running operation finished ('done': true) but its response contains an 'error' object, meaning the ingestion/corpus operation failed server-side; the error payload is included in the message.","triggerScenarios":"Thrown at litellm/rag/ingestion/vertex_ai_ingestion.py:266 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Inspect the operation error details and fix the underlying cause (permissions, quotas, invalid config)."],"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"}