Skip to content

Commit da3fd00

Browse files
committed
refactor: change errorServiceUnavailable function signature to avoid parameter passing error
Signed-off-by: BoHong Li <[email protected]>
1 parent 13ed2e6 commit da3fd00

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/middleware/tooBusy.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ toobusy.maxLag(config.responseMaxLag)
99

1010
module.exports = function (req, res, next) {
1111
if (toobusy()) {
12-
response.errorServiceUnavailable(res)
12+
response.errorServiceUnavailable(req, res)
1313
} else {
1414
next()
1515
}

lib/response.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function errorInternalError (req, res) {
5353
responseError(res, '500', 'Internal Error', 'wtf.')
5454
}
5555

56-
function errorServiceUnavailable (res) {
56+
function errorServiceUnavailable (req, res) {
5757
res.status(503).send('I\'m busy right now, try again later.')
5858
}
5959

0 commit comments

Comments
 (0)