Skip to content

Commit 2c6bf86

Browse files
committed
Supply the file error mock status default
1 parent 796939f commit 2c6bf86

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎apps/sim/app/api/files/serve/[...path]/route.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ describe('File Serve API Route', () => {
214214
mockCreateConditionalFileResponse.mockImplementation((file: unknown) =>
215215
mockCreateFileResponse(file)
216216
)
217-
mockFileErrorResponse.mockImplementation((error: Error) => {
217+
mockFileErrorResponse.mockImplementation((error: Error, status = 500) => {
218218
return new Response(JSON.stringify({ error: error.name, message: error.message }), {
219219
status: error.name === 'FileNotFoundError' ? 404 : status,
220220
headers: { 'Content-Type': 'application/json' },

0 commit comments

Comments
 (0)