Question

4
Replies
3210
Views
Mariane Ammar (MarianeA)
Murex

Murex
LB
MarianeA Member since 2016 78 posts
Murex
Posted: June 1, 2017
Last activity: June 1, 2017
Posted: 1 Jun 2017 3:29 EDT
Last activity: 1 Jun 2017 10:37 EDT
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, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.