Skip to content

Commit

Permalink
fix: add missing error logging in file middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
fabio-nettis committed Mar 20, 2024
1 parent b9ea24b commit e37ddad
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/middleware/files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,8 @@ export default async function files(ctx: Context, next: Next) {

const content = await file.arrayBuffer();
return ctx.newResponse(content, 200, { "Content-Type": mimeType });
} catch {
} catch (error: any) {
console.error(error);
return ctx.newResponse("Not Found", 404);
}
}

0 comments on commit e37ddad

Please sign in to comment.