forked from phoenix/litellm-mirror
fix(utils.py): improve exception mapping for vertex ai
This commit is contained in:
parent
3e2750ffb9
commit
9bd1f4ebd0
1 changed files with 8 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue