Posted: 1 Jun 2017 3:29 EDT Last activity: 1 Jun 2017 10:37 EDT
Catch Exceptions of Connect-REST
Currently we have a Connect-REST that maps the response to JSON.
When server we are trying to reach is down, we get a status code 500 with a response message that has HTML tags in it.
In this case we are getting a mapping Exception that we cannot catch and the activity ends without going over the remaining steps
com.pega.pegarules.pub.services.InboundMappingException: Error mapping incoming response to .Response.response_GET: com.fasterxml.jackson.core.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source:
503 Service Unavailable
No server is available to handle this request. ; line: 1, column: 2]
Our current workaround is to add a try/catch statement to the current OOTB activity pyInvokeRest but we would rather not change it.