summaryrefslogtreecommitdiff
path: root/lib/web/middleware
diff options
context:
space:
mode:
Diffstat (limited to 'lib/web/middleware')
-rw-r--r--lib/web/middleware/checkURIValid.js4
-rw-r--r--lib/web/middleware/tooBusy.js4
2 files changed, 4 insertions, 4 deletions
diff --git a/lib/web/middleware/checkURIValid.js b/lib/web/middleware/checkURIValid.js
index 88065e79..cd6dabd2 100644
--- a/lib/web/middleware/checkURIValid.js
+++ b/lib/web/middleware/checkURIValid.js
@@ -1,14 +1,14 @@
'use strict'
const logger = require('../../logger')
-const response = require('../../response')
+const errors = require('../../errors')
module.exports = function (req, res, next) {
try {
decodeURIComponent(req.path)
} catch (err) {
logger.error(err)
- return response.errorBadRequest(res)
+ return errors.errorBadRequest(res)
}
next()
}
diff --git a/lib/web/middleware/tooBusy.js b/lib/web/middleware/tooBusy.js
index 49efbe37..a2101975 100644
--- a/lib/web/middleware/tooBusy.js
+++ b/lib/web/middleware/tooBusy.js
@@ -2,14 +2,14 @@
const toobusy = require('toobusy-js')
-const response = require('../../response')
+const errors = require('../../errors')
const config = require('../../config')
toobusy.maxLag(config.tooBusyLag)
module.exports = function (req, res, next) {
if (toobusy()) {
- response.errorServiceUnavailable(res)
+ errors.errorServiceUnavailable(res)
} else {
next()
}