mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 19:24:27 +00:00
fix(utils.py): catch 422-status errors
This commit is contained in:
parent
fb9bc54c28
commit
efaffd84e1
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