Skip to content

Commit 39477d5

Browse files
Add test for 404 status response for ModelNotFound error type in errorResponse function.
1 parent 87a6185 commit 39477d5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/utils/errorResponse.test.ts

+6
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,12 @@ describe('createErrorResponse', () => {
3232
expect(response.status).toBe(403);
3333
});
3434

35+
it('returns a 404 status for ModelNotFound error type', () => {
36+
const errorType = AgentRuntimeErrorType.ModelNotFound;
37+
const response = createErrorResponse(errorType);
38+
expect(response.status).toBe(404);
39+
});
40+
3541
it('returns a 429 status for InsufficientQuota error type', () => {
3642
const errorType = AgentRuntimeErrorType.InsufficientQuota;
3743
const response = createErrorResponse(errorType);

0 commit comments

Comments
 (0)