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:

image

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!

http://techcommunity.softwareag.com/pwiki/-/wiki/Main/Invoke%20webMethods%20IS%20policy%20in%20API%20Gateway%2010.2

HTH,
RMG

Can you explore this service pub.schema:validate?