Skip to content

Commit c5fbd54

Browse files
committed
404 => 400
@mishig25
1 parent a0a865f commit c5fbd54

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/tiny-agents/src/lib/webServer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,9 @@ export function startServer(agent: Agent): void {
5555
requestBody = ChatCompletionInputSchema.parse(body);
5656
} catch (err) {
5757
if (err instanceof z.ZodError) {
58-
return res.error(404, "Invalid ChatCompletionInput body \n" + JSON.stringify(err));
58+
return res.error(400, "Invalid ChatCompletionInput body \n" + JSON.stringify(err));
5959
}
60-
return res.error(404, "Invalid ChatCompletionInput body");
60+
return res.error(400, "Invalid ChatCompletionInput body");
6161
}
6262
/// Ok, from now on we will send a SSE (Server-Sent Events) response.
6363
res.setHeaders(

0 commit comments

Comments
 (0)