Skip to content

Commit

Permalink
Merge pull request #47 from maugenst/master
Browse files Browse the repository at this point in the history
Adds console logging for validation errors
  • Loading branch information
theganyo authored Aug 7, 2016
2 parents cc89cb2 + ce3d1a1 commit 20f123d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,14 @@ function Runner(appJsConfig, cb) {
})
.catch(function(err) {
console.error('Error in callback! Tossing to global error handler.', err.stack);

if (err.validationErrors) {
console.error('Details: ');
for (var i= 0; i<err.validationErrors.length; i++) {
console.error("\t#" + i + ".: " + err.validationErrors[i].message + " in swagger config at: >" + err.validationErrors[i].path.join('/') + "<");
}
}

process.nextTick(function() { throw err; });
})
}
Expand Down

0 comments on commit 20f123d

Please sign in to comment.