BerriAI/litellm · error · Exception
Failed to poll operation: {response.text}
Error message
Failed to poll operation: {response.text} What it means
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.
Source
Thrown at litellm/rag/ingestion/vertex_ai_ingestion.py:258
url: Final = f"{base_url}/v1beta1/{operation_name}"
client: Final = get_async_httpx_client(
llm_provider=httpxSpecialProvider.RAG,
params={"timeout": 60.0},
)
for attempt in range(max_retries):
response = await client.get(
url,
headers={
"Authorization": f"Bearer {access_token}",
},
)
if response.status_code != 200:
error_msg = f"Failed to poll operation: {response.text}"
verbose_logger.error(error_msg)
raise Exception(error_msg)
operation_data = response.json()
if operation_data.get("done"):
# Check for errors
if "error" in operation_data:
error = operation_data["error"]
raise Exception(f"Operation failed: {error}")
# Extract corpus name from response
corpus_name = operation_data.get("response", {}).get("name", "")
if corpus_name:
return corpus_name
else:
raise Exception(f"No corpus name in operation response: {operation_data}")
verbose_logger.debug("Operation not done yet, attempt %s/%s", attempt + 1, max_retries)
await asyncio.sleep(retry_delay)View on GitHub (pinned to 77b7c6c40c)
Solutions
- Check the response text; verify credentials and that the operation name is valid, then retry polling.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at litellm/rag/ingestion/vertex_ai_ingestion.py:258 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/c5e8ad9184ad3e6c.
Report an issue: GitHub.