How to change default exception which is thrown when Validate Input is turned on

Hi all,

I am building REST API and wondering if there is any way to change the exception response when validation of input fails?

This is response I am getting through postman:


And I want to send JSON with message that validation failed. Is there a way to change that default response? Becasue in that case request is not entering the pipeline.

Hi Filip,

Yes you can definitely customize the outbound response (Content-Type: application/json) back to the requester/client.

Please check if this article helps you with Response Processing terms!


Can you explore this service pub.schema:validate?