diff --git a/passthrough-proxy-with-keyvalidation/app.js b/passthrough-proxy-with-keyvalidation/app.js index 8ec527e..6768719 100755 --- a/passthrough-proxy-with-keyvalidation/app.js +++ b/passthrough-proxy-with-keyvalidation/app.js @@ -16,7 +16,7 @@ a127.init(function(config) { app.use(function(err, req, res, next) { if (err && typeof err === 'object') { Object.defineProperty(err, 'message', { enumerable: true }); - res.end(JSON.stringify(err)); + return res.end(JSON.stringify(err)); } next(err); });