Can we throw custom http status code and message using groovy?
I am looking to see if i can use groovy code to handle custom error messages like below?
There is a logic in my groovy code where it throws invalid date range if If my date is greater then 90 days. I don't have logic where it also change custom status code/message. I want to see if i can throw status code = 405 and message as = Bad Request. Currently it is throwing 200 OK.