fix(utils.py): add exception mapping for gemini error

This commit is contained in:
Krrish Dholakia 2024-04-30 14:17:10 -07:00
parent 638477a023
commit 3cc82f558e
2 changed files with 6 additions and 1 deletions

View file

@ -8130,7 +8130,10 @@ def exception_type(
llm_provider="vertex_ai",
response=original_exception.response,
)
elif "None Unknown Error." in error_str:
elif (
"None Unknown Error." in error_str
or "Content has no parts." in error_str
):
exception_mapping_worked = True
raise APIError(
message=f"VertexAIException - {error_str}",