fix(utils.py): correctly re-raise azure api connection error

'
This commit is contained in:
Krrish Dholakia 2024-07-29 12:28:12 -07:00
parent 63531a9824
commit 59384c84a5
3 changed files with 17 additions and 8 deletions

View file

@ -7866,6 +7866,14 @@ def exception_type(
model=model,
litellm_debug_info=extra_information,
)
elif "Connection error" in error_str:
exception_mapping_worked = True
raise APIConnectionError(
message=f"{exception_provider} APIConnectionError - {message}",
llm_provider=custom_llm_provider,
model=model,
litellm_debug_info=extra_information,
)
elif hasattr(original_exception, "status_code"):
exception_mapping_worked = True
if original_exception.status_code == 400: