From 6dc7ded1a6aec87d0b5572766501c9919c930c73 Mon Sep 17 00:00:00 2001 From: ishaan-jaff Date: Fri, 9 Feb 2024 14:37:34 -0800 Subject: [PATCH] (bedrock) raise timeout error --- litellm/utils.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/litellm/utils.py b/litellm/utils.py index 0ab5d6725..bea16a221 100644 --- a/litellm/utils.py +++ b/litellm/utils.py @@ -6643,6 +6643,13 @@ def exception_type( llm_provider="bedrock", response=original_exception.response, ) + if "Connect timeout on endpoint URL" in error_str: + exception_mapping_worked = True + raise Timeout( + message=f"BedrockException: Timeout Error - {error_str}", + model=model, + llm_provider="bedrock", + ) if hasattr(original_exception, "status_code"): if original_exception.status_code == 500: exception_mapping_worked = True