diff --git a/middleware/swagger-validator.js b/middleware/swagger-validator.js index 484a242abc..d756a68cab 100644 --- a/middleware/swagger-validator.js +++ b/middleware/swagger-validator.js @@ -291,6 +291,7 @@ var wrapEnd = function (req, res, next) { } catch (err) { if (err.failedValidation) { err.originalResponse = data; + err.responseValidation = true; err.message = 'Response validation failed: ' + err.message.charAt(0).toLowerCase() + err.message.substring(1); debug(' Validation: failed');