I want to do something like this -
try{
if(someError)
throw someErrorException()
}catch someErrorException{
result.message = "someError happened"
}
Expected output in postman if the someError condition is true -
Status Code = 500 & response message = someError happened"
Instead of this, I am able to get it into status code 500 by forcefully writing erroneous code within the if statement but I am not able to set the error message. Its the standard error message which comes - "XYZ check scriptLog"
Hi @AD_10324110
I wanted to follow up with you on your post to see if your question has been answered.
If so, please mark the appropriate reply as the Accepted Solution for the benefit of other members who may have the same question.
Of course, if you have more to share on your issue, please let the Community know so that we can continue to support.
Thanks,
Wenjing
