mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-25 10:44:24 +00:00
fix exception mapping
This commit is contained in:
parent
05285c5844
commit
93fb247b1d
4 changed files with 6 additions and 2 deletions
|
@ -1908,6 +1908,7 @@ def exception_type(model, original_exception, custom_llm_provider):
|
|||
elif custom_llm_provider == "vllm":
|
||||
if hasattr(original_exception, "status_code"):
|
||||
if original_exception.status_code == 0:
|
||||
exception_mapping_worked = True
|
||||
raise APIConnectionError(
|
||||
message=f"VLLMException - {original_exception.message}",
|
||||
llm_provider="vllm",
|
||||
|
@ -1931,7 +1932,10 @@ def exception_type(model, original_exception, custom_llm_provider):
|
|||
):
|
||||
threading.Thread(target=get_all_keys, args=(e.llm_provider,)).start()
|
||||
# don't let an error with mapping interrupt the user from receiving an error from the llm api calls
|
||||
raise original_exception
|
||||
if exception_mapping_worked:
|
||||
raise e
|
||||
else:
|
||||
raise original_exception
|
||||
|
||||
|
||||
####### CRASH REPORTING ################
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue