Question

1
Replies
112
Views
Close popover
Pratheep Kumar M S (PRATHEEP KUMAR MS)
TCS

TCS
GB
PRATHEEP KUMAR MS Member since 2011 22 posts
TCS
Posted: April 22, 2020
Last activity: April 22, 2020

how to get http response code when connect rest invoked from data page

we are on Pega 8.3.1

I am trying to display diff messages on screen based on http response code. 

our external service codes are as below:

  • HTTP 200 -  Success (Covers scenarios where Individual Parties are found.)
  • HTTP 400 – Client validation error
  • HTTP 401 – Authentication error
  • HTTP 429 - "Too Many Requests"
  • HTTP 500 – Internal Server Error

on which property on exact response could this value be captured? 

on data page I am only seeing the below 3 properties:

 pyStatusMessage  com.pega.pegarules.pub.services.ConnectorException: Caught unhandled exception: java.lang.RuntimeException: java.net.UnknownHostException: ocis: Name or service not known 
 pyStatus  Fail 
 pyStatusValue  Fail:InternalReason 

currentky my host system is not ready - so when i invoke I get the above error message.

Pega Platform 8.3.1 Enterprise Application Development Dev/Designer Studio Financial Services Solutions Engineer