mirror of
https://github.com/BerriAI/litellm.git
synced 2025-04-26 11:14:04 +00:00
test(test_streaming.py): add exception mapping for palm timeout error
This commit is contained in:
parent
acae98fd50
commit
e07cf33cba
2 changed files with 10 additions and 0 deletions
|
@ -6824,6 +6824,14 @@ def exception_type(
|
|||
llm_provider="palm",
|
||||
response=original_exception.response,
|
||||
)
|
||||
if "504 Deadline expired before operation could complete." in error_str:
|
||||
exception_mapping_worked = True
|
||||
raise Timeout(
|
||||
message=f"PalmException - {original_exception.message}",
|
||||
model=model,
|
||||
llm_provider="palm",
|
||||
request=original_exception.request,
|
||||
)
|
||||
if "400 Request payload size exceeds" in error_str:
|
||||
exception_mapping_worked = True
|
||||
raise ContextWindowExceededError(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue