mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix(utils.py): revert exception mapping change
This commit is contained in:
parent
f05aba1f85
commit
f2a8ceddc2
1 changed files with 9 additions and 0 deletions
|
@ -5740,6 +5740,15 @@ def exception_type(
|
|||
model=model,
|
||||
llm_provider="openai",
|
||||
)
|
||||
else:
|
||||
exception_mapping_worked = True
|
||||
raise APIError(
|
||||
status_code=original_exception.status_code,
|
||||
message=f"OpenAIException - {original_exception.message}",
|
||||
llm_provider="openai",
|
||||
model=model,
|
||||
request=original_exception.request,
|
||||
)
|
||||
else:
|
||||
# if no status code then it is an APIConnectionError: https://github.com/openai/openai-python#handling-errors
|
||||
raise APIConnectionError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue