Skip to content

Commit 20f123d

Browse files
authored
Merge pull request #47 from maugenst/master
Adds console logging for validation errors
2 parents cc89cb2 + ce3d1a1 commit 20f123d

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

index.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,14 @@ function Runner(appJsConfig, cb) {
238238
})
239239
.catch(function(err) {
240240
console.error('Error in callback! Tossing to global error handler.', err.stack);
241+
242+
if (err.validationErrors) {
243+
console.error('Details: ');
244+
for (var i= 0; i<err.validationErrors.length; i++) {
245+
console.error("\t#" + i + ".: " + err.validationErrors[i].message + " in swagger config at: >" + err.validationErrors[i].path.join('/') + "<");
246+
}
247+
}
248+
241249
process.nextTick(function() { throw err; });
242250
})
243251
}

0 commit comments

Comments
 (0)