Question

4
Replies
2937
Views
MarianeA Member since 2016 72 posts
Murex
Posted: 3 years ago
Last activity: 3 years 3 months ago
Closed

Catch Exceptions of Connect-REST

Hello,

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.

Any thoughts on how to catch this Exception ?

Thank you,

Mariane

***Moderator Edit: Vidyaranjan | Updated Categories***

Data Integration
Moderation Team has archived post
Share this page LinkedIn