From ab3a997c130988e09f83aee335725537f9af6bb5 Mon Sep 17 00:00:00 2001 From: Tedde Lundgren Date: Mon, 3 Sep 2012 09:46:23 +0200 Subject: [PATCH] Fix error call in httpRequestWrapper --- lib/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index 591760c..a395506 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -132,7 +132,7 @@ Utils.httpRequestWrapper = function(server, options) { if(response) { var body = ''; // stringifies JSON - try { body = JSON.stringify(response, options.replacer); } catch(err) { return next(err); } + try { body = JSON.stringify(response, options.replacer); } catch(err) { return error(err, 400); } var headers = { "content-length": Buffer.byteLength(body, options.encoding), "content-type": "application/json"