From f8b3968e5cbc384c4867ef3c06a79a35110ac21f Mon Sep 17 00:00:00 2001 From: Scott Ganyo Date: Mon, 27 Jul 2015 14:42:31 -0700 Subject: [PATCH] fix bug causing errors to propagated inappropriately --- passthrough-proxy-with-keyvalidation/app.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); });