mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
fix(utils.py): exception mapping grpc none unknown error to api error
This commit is contained in:
parent
fabc398acd
commit
a862201a84
1 changed files with 9 additions and 0 deletions
|
@ -7842,6 +7842,15 @@ def exception_type(
|
||||||
llm_provider="vertex_ai",
|
llm_provider="vertex_ai",
|
||||||
response=original_exception.response,
|
response=original_exception.response,
|
||||||
)
|
)
|
||||||
|
elif "None Unknown Error." in error_str:
|
||||||
|
exception_mapping_worked = True
|
||||||
|
raise APIError(
|
||||||
|
message=f"VertexAIException - {error_str}",
|
||||||
|
status_code=500,
|
||||||
|
model=model,
|
||||||
|
llm_provider="vertex_ai",
|
||||||
|
request=original_exception.request,
|
||||||
|
)
|
||||||
elif "403" in error_str:
|
elif "403" in error_str:
|
||||||
exception_mapping_worked = True
|
exception_mapping_worked = True
|
||||||
raise BadRequestError(
|
raise BadRequestError(
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue