Skip to content

Commit

Permalink
Oops
Browse files Browse the repository at this point in the history
  • Loading branch information
karanikiotis committed Nov 17, 2024
1 parent 8b2ea80 commit 77bd1b8
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/middleware/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export const setServerTimeout = (millis = 5 * 60 * 1000) => (req, res, next) => {
req.setTimeout(millis, () => res.status(408).json({ message: "Request Timeout" }));
res.setTimeout(millis, () => res.status(503).json({ message: "Service Unavailable" }));
next();
};

0 comments on commit 77bd1b8

Please sign in to comment.