Skip to content

Commit

Permalink
Improve error handler: Log internal errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ShootingStar91 committed Aug 7, 2024
1 parent 4d6bbc3 commit 4f061b7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion backend/src/middlewares/errorHandler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export const errorHandler = (
// eslint-disable-next-line @typescript-eslint/no-unused-vars
_next: express.NextFunction
) => {
if ('status' in error) {
if ('status' in error && error.status !== 500) {
return res.status(error.status as number).json({ message: error.message })
}

Expand Down

0 comments on commit 4f061b7

Please sign in to comment.