fix(utils.py): improve exception mapping for vertex ai

This commit is contained in:
Krrish Dholakia 2023-11-16 22:02:19 -08:00
parent 3e2750ffb9
commit 9bd1f4ebd0

View file

@ -3612,6 +3612,14 @@ def exception_type(
llm_provider="vertex_ai",
response=original_exception.response
)
elif "403 Permission denied" in error_str:
exception_mapping_worked = True
raise AuthenticationError(
message=f"VertexAIException - {error_str}",
model=model,
llm_provider="vertex_ai",
response=original_exception.response
)
elif custom_llm_provider == "palm":
if "503 Getting metadata" in error_str:
# auth errors look like this