Skip to content

Commit

Permalink
Fix error call in httpRequestWrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
tedeh committed Sep 3, 2012
1 parent 655e2fb commit ab3a997
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/utils.js
Expand Up @@ -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"
Expand Down

0 comments on commit ab3a997

Please sign in to comment.