diff --git a/lib/middleware/tooBusy.js b/lib/middleware/tooBusy.js index 13642c6c..65fa4b7d 100644 --- a/lib/middleware/tooBusy.js +++ b/lib/middleware/tooBusy.js @@ -9,7 +9,7 @@ toobusy.maxLag(config.responseMaxLag) module.exports = function (req, res, next) { if (toobusy()) { - response.errorServiceUnavailable(res) + response.errorServiceUnavailable(req, res) } else { next() } diff --git a/lib/response.js b/lib/response.js index 3e9cb891..0de8f9bc 100644 --- a/lib/response.js +++ b/lib/response.js @@ -53,7 +53,7 @@ function errorInternalError (req, res) { responseError(res, '500', 'Internal Error', 'wtf.') } -function errorServiceUnavailable (res) { +function errorServiceUnavailable (req, res) { res.status(503).send('I\'m busy right now, try again later.') }