forked from phoenix/litellm-mirror
fix(utils.py): catch 422-status errors
This commit is contained in:
parent
95f972ee9f
commit
d182ea0f77
2 changed files with 28 additions and 7 deletions
|
@ -6068,6 +6068,14 @@ def exception_type(
|
|||
model=model,
|
||||
llm_provider="replicate",
|
||||
)
|
||||
elif original_exception.status_code == 422:
|
||||
exception_mapping_worked = True
|
||||
raise UnprocessableEntityError(
|
||||
message=f"ReplicateException - {original_exception.message}",
|
||||
llm_provider="replicate",
|
||||
model=model,
|
||||
response=original_exception.response,
|
||||
)
|
||||
elif original_exception.status_code == 429:
|
||||
exception_mapping_worked = True
|
||||
raise RateLimitError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue