hapi-openapi icon indicating copy to clipboard operation
hapi-openapi copied to clipboard

joi validation function called as async, leading to incorrect error handling

Open DanielAnfelt opened this issue 5 years ago • 0 comments

In Validators.js, there is a call const result = await schema.validate(data); which does not seem to work as intended. The joi validation will return an object with a error property and a result. When I run the current code, I get the validation error, but not through the indented flow. As a result, the details that explain what I messed up don't propagate back to me.

DanielAnfelt avatar Nov 27 '19 19:11 DanielAnfelt