Skip to content

Commit

Permalink
status code modified to align with backend
Browse files Browse the repository at this point in the history
  • Loading branch information
M-Naveed-Ashraf committed Nov 1, 2024
1 parent 80d7488 commit 6ffc760
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions promptlayer/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async def arun_workflow_request(
try:
async with httpx.AsyncClient() as client:
response = await client.post(url, json=payload, headers=headers)
if response.status_code != 200:
if response.status_code != 201:
raise_on_bad_response(
response,
"PromptLayer had the following error while running your workflow",
Expand All @@ -81,7 +81,7 @@ async def arun_workflow_request(
headers=headers,
params={"capability": channel_name},
)
if ws_response.status_code != 200:
if ws_response.status_code != 201:
raise_on_bad_response(
ws_response,
"PromptLayer had the following error while getting WebSocket token",
Expand Down Expand Up @@ -1006,7 +1006,7 @@ async def apublish_prompt_template(
raise Exception(
f"PromptLayer had the following error while publishing your prompt template: {response.text}"
)
if response.status_code != 200:
if response.status_code != 201:
raise_on_bad_response(
response,
"PromptLayer had the following error while publishing your prompt template",
Expand Down

0 comments on commit 6ffc760

Please sign in to comment.