diff --git a/src/middleware/index.js b/src/middleware/index.js index d1dbae6..4e74be9 100644 --- a/src/middleware/index.js +++ b/src/middleware/index.js @@ -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(); };