mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
(gemini)Handle HTTP 201 status code in Vertex AI response
This commit is contained in:
parent
77c1a809f3
commit
8d053930e9
1 changed files with 2 additions and 2 deletions
|
|
@ -846,7 +846,7 @@ async def make_call(
|
|||
message=VertexGeminiConfig().translate_exception_str(exception_string),
|
||||
headers=e.response.headers,
|
||||
)
|
||||
if response.status_code != 200:
|
||||
if response.status_code != 200 and response.status_code != 201:
|
||||
raise VertexAIError(
|
||||
status_code=response.status_code,
|
||||
message=response.text,
|
||||
|
|
@ -884,7 +884,7 @@ def make_sync_call(
|
|||
|
||||
response = client.post(api_base, headers=headers, data=data, stream=True)
|
||||
|
||||
if response.status_code != 200:
|
||||
if response.status_code != 200 and response.status_code != 201:
|
||||
raise VertexAIError(
|
||||
status_code=response.status_code,
|
||||
message=str(response.read()),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue