BerriAI/litellm · error · ValueError
Timeout error occurred
Error message
Timeout error occurred
What it means
Wrapper that converts an httpx.TimeoutException from the async GetSecretValue POST into a plain ValueError. It means the AWS Secrets Manager HTTP request exceeded the configured timeout param before a response arrived; supply a larger timeout or retry.
Source
Thrown at litellm/secret_managers/aws_secret_manager_v2.py:149
)
endpoint_url, headers, body = self._prepare_request(
action="GetSecretValue",
secret_name=secret_name,
optional_params=optional_params,
)
async_client: Final = get_async_httpx_client(
llm_provider=httpxSpecialProvider.SecretManager,
params={"timeout": timeout},
)
try:
response: Final = await async_client.post(url=endpoint_url, headers=headers, data=body.decode("utf-8"))
response.raise_for_status()
return response.json()["SecretString"]
except httpx.TimeoutException:
raise ValueError("Timeout error occurred")
except Exception as e:
verbose_logger.exception(
"Error reading secret='%s' from AWS Secrets Manager: %s",
secret_name,
str(e),
)
return None
def sync_read_secret(
self,
secret_name: str,
optional_params: dict | None = None,
timeout: float | httpx.Timeout | None = None,
primary_secret_name: str | None = None,
) -> str | None:
"""
Sync function to read a secret from AWS Secrets Manager
View on GitHub (pinned to 77b7c6c40c)
Solutions
- Check network connectivity to AWS and increase the client timeout/retry configuration.
- Verify the AWS endpoint is reachable (VPC endpoints/proxies) and credentials are valid, then retry.
Defensive patterns
Strategy: retry
When it happens
Trigger: Thrown at litellm/secret_managers/aws_secret_manager_v2.py:149 when the library encounters an invalid state.
Common situations: See trigger scenarios.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18).
Data as JSON: /api/errors/6d03649389ae3ddb.
Report an issue: GitHub.