Permalink
Browse files

Fix error call in httpRequestWrapper

  • Loading branch information...
1 parent 655e2fb commit ab3a997c130988e09f83aee335725537f9af6bb5 @tedeh committed Sep 3, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/utils.js
View
@@ -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"

0 comments on commit ab3a997

Please sign in to comment.