How to parse error body in REST API call with Groovy?
Summary:
Good afternoon. Hope you can help me out. We have a Groovy script in our Fusion environment that sends a REST call. Once in a while we will receive an error from the downstream application that will return a 500 or 400. I would like to print the error message from the downstream application to the User using a ValidationException(). Is there a function/property to retrieve the error from the REST response?
Content (please ensure you mask any confidential information):
In the code below. printing out the Exception does not include the actual REST response body. Here is a copy of the message from my code:
0