Capture runtime exception and return it as 400 bad request
I have a REST service and when I send a bad request like an invalid timestamp I see the below error in Pega and in postman its returned as 500 Internal Server Error. I need to send it as 400 since the mapping of the incoming data is failing in this process.
Pls let me know if there's a way to do this. Thanks in advance.
|