Yicong-Huang commented on code in PR #5605:
URL: https://github.com/apache/texera/pull/5605#discussion_r3392080939
##########
agent-service/src/server.test.ts:
##########
@@ -112,8 +129,22 @@ describe(`POST ${API}/agents`, () => {
expect(body.error).toBe("Invalid or expired token");
});
+ test("rejects missing userToken", async () => {
+ const res = await postJson(`${API}/agents`, { modelType: "m" });
+ // Body schema violation; the exact status depends on the Elysia version
but
+ // it is always a 4xx or 5xx, never a successful 2xx.
+ expect(res.status).toBeGreaterThanOrEqual(400);
+ });
Review Comment:
we should prevent 500 as much as possible. please return the correct http
return code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]