New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support failAction function on validation response failures #3214
Comments
I need more info. Can you show a mock example? |
We use request.id to log actions of this request throughout the lifecycle. Our code looks something like this.
Without the failAction's, when Joi Validation fails, onPreResponse is never called and the requestId is never added to the response header. I am currently able to do this on the request side by implementing failAction, but on the response side the function is not implemented. I took a stab at it locally and it worked well. |
@hueniverse Let me know if you need more information. |
Not to pester, but any way to get some attention on this issue? |
I can configure a custom handler to handle validation failures for request validation. It would be nice to be able to do the same for response validation. Specifically, we need the ability to add a requestId header to help with issue reports.
Let me know if you want a PR.
The text was updated successfully, but these errors were encountered: