Question
![](/profiles/pega_profile/modules/pega_user_image/assets/user-icon.png)
Virtusa Consulting Services Pvt. Ltd.
US
Last activity: 22 Jun 2023 13:16 EDT
How to read or capture Connect-REST failure reason behind 404, 500 error codes
Hi Everyone,
When a Connect-REST fails with 404 and 500 errors codes although the error details are in the backend, is there a way to read them back to calling activity or data page?
I see those details in logs when I enable com.pega.pegarules.integration.engine.internal.connect.rest.RESTConnector to Debug / ALL but, I am not able to find them in any local variable or params of invoke / pyInvokeRESTConnector.
After enabling above setting, log says below
------------------HTTP RESPONSE CONTENTS------------------ Response Headers: Connection: keep-alive Content-Type: application/json Date: Tue, 30 May 2023 03:45:43 GMT RespRuleErrorCode: 0x00000000 Transfer-Encoding: chunked X-Backside-Transport: FAIL FAIL,FAIL FAIL X-Global-Transaction-ID: 804c2337647571677e3fac1f Response Message Data: 554 bytes received {"exceptions":[{"type":"E","code":"1002","message":"ERR3031 PMG/IPA PROV CONT NOT FND FOR PRODUCT"}]} ----------------END HTTP RESPONSE CONTENTS----------------
I need to read the message variable from above line. Any insight is appreciated.
Pega version: 8.8.1
Thank you!