Question

5
Replies
7896
Views
MarianeA Member since 2016 72 posts
Murex
Posted: October 25, 2016
Last activity: November 7, 2016
Closed
Solved

Handle exception when calling 'Connect-REST'

Hello,

I have an activity calling a Connector whose HTTP Method is GET via the activity method 'Connect-REST'.

It might happen that the service returns an HTTP Sttaus of 500/503.

In this case, before the end of the method 'Connect-REST',  an exception gets thrown in the predefined activity pyInvokeRESTConnector CL: Rule-Connect-REST RS:Pega-IntegrationEngine:07-10-23  with the following exception trace:

 com.pega.pegarules.pub.services.InboundMappingException: Error mapping incoming response to .Response.response_GET: org.codehaus.jackson.JsonParseException: Unexpected character ('<' (code 60)): expected a valid value (number, String, array, object, 'true', 'false' or 'null') at [Source: java.io.StringReader@4f0f4729; line: 1, column: 2] 

and the processing of the rest of the activity stops.

Any ideas on how to handle a return the exception thrown by the activity  pyInvokeRESTConnector ?

Thank you,

Mariane

***Updated by Moderator: Marissa: Moved from Pega Academy to Product Support Community, updated categories***

Data Integration
Moderation Team has archived post
Share this page LinkedIn