Skip to content

Commit

Permalink
Create errorHandler.js
Browse files Browse the repository at this point in the history
  • Loading branch information
KOSASIH authored Aug 8, 2024
1 parent 6cd3f1f commit f1034e5
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
export const errorHandler = (err, req, res, next) => {
console.error(err);
res.status(500).json({ message: 'Internal Server Error' });
};

0 comments on commit f1034e5

Please sign in to comment.