Skip to content
This repository has been archived by the owner on Sep 14, 2022. It is now read-only.

Commit

Permalink
removed stringify of error
Browse files Browse the repository at this point in the history
  • Loading branch information
fehguy committed Oct 31, 2014
1 parent dc002d0 commit 0b9cd23
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/swagger.js
Expand Up @@ -530,12 +530,12 @@ Swagger.prototype.addValidator = function(v) {
Swagger.prototype.stopWithError = function(res, error) {
this.setHeaders(res);
if (error && error.message && error.code)
res.send(JSON.stringify(error), error.code);
else
res.send(JSON.stringify({
'message': 'internal error',
'code': 500
}), 500);
console.log(JSON.stringify(error));

res.send(JSON.stringify({
'message': 'internal error',
'code': 500
}), 500);
};

Swagger.prototype.setApiInfo = function(data) {
Expand Down

0 comments on commit 0b9cd23

Please sign in to comment.