Skip to content

Commit

Permalink
Merge pull request #108 from OpenAssistantGPT/feat/font-size-option
Browse files Browse the repository at this point in the history
feat: update return status code on chat error
  • Loading branch information
marcolivierbouch authored Sep 30, 2024
2 parents 6367c13 + b29c271 commit 0ff710f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/gorgeous-terms-wonder.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@openassistantgpt/assistant': patch
---

Change on error return status code when chatting
2 changes: 1 addition & 1 deletion packages/assistant/src/assistant/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ export async function handleAssistant(
}

if (error instanceof OpenAI.APIError) {
return new Response(error.message, { status: 401 });
return new Response(error.message, { status: 400 });
}

return new Response(null, { status: 500 });
Expand Down

0 comments on commit 0ff710f

Please sign in to comment.