Question
BPM Company
NL
Last activity: 16 Oct 2018 12:03 EDT
In a CONNECT-REST the response status text is not received
When I'm doing a POST request to a REST service by using a pega REST connector, it always returns a responsecode, like 200, 400, 500 etc, which is mapped to pyHTTPResponseCode.
Alongside the responsecode a REST service also returns a status text like "Bad Request", "OK", "Internal Error", "Not Found".
The external, proprietary, service we call does not send standard status texts, but sends custom status texts. For instance on status 400 it sends "Missing 'To' or 'Recipients' property" in stead of "Bad Request".
I would like to get that custom text, so i can show it to the user.
Is there a possibility to get this from pega somehow. I could not find it on any page (local page, param page, step page), see attachment.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
-
Like (0)
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Accepted Solution
Pegasystems Inc.
US
If you are using Pega 7.3.1 or later, you should be able to find the HTTP status text on the parameter page after calling the REST Connector.
The parameter name is pyHTTPStatusLine.
Pegasystems Inc.
US
After calling the Connector, please look for the "pyStatusMsg" parameter on your parameter page. The "status line" from the Server's response may be there.
If not, what do you see as the value for the "pyStatusMsg" parameter? Is it an artificial explanation of the status code?
BPM Company
NL
Hi,
I just had a look, but this property has the value:
the HTTP response code of 400 indicated a client error. The response data may contain a reason. // The body of the service's response, which is set up for mapping in the Connector rule, was empty for this service call.
I looked at the activity ran by pega (Invoke and pyInvokeRestConnector) and this is a value set by pega when the result is not 200. But it is not the status text.
Any other options?
Pegasystems Inc.
US
That's what I was thinking would happen.
There may be a local change you can make in pyInvokeRestConnector to pull the status line out of the HTTP response and put it into a property of your choice.
As getting the real status line is important to you (and I definitely understand why it is!) then I suggest creating a Service Request to have your options explored/weighed by Global Customer Support.
Pegasystems Inc.
IN
Hello!
Please let us know if you do log an SR for this and its ID. That way we can track it and follow-up this discussion with the resolution.
Thank you,
-
karthigeyan ravichandran
BPM Company
NL
I raised a ticket and GCS told me to raise it here. Since it is not somthing they look into because it is not a system failure. Maybe it should be an enhancement?
Pegasystems Inc.
US
Did they provide you with a ticket ID? I will talk to them about it for you.
BPM Company
NL
Ticket is: SR-B69933
Pegasystems Inc.
US
Thanks. I have found the ticket and will review it.
Pegasystems Inc.
US
Would you mind contacting GCS again?
They may re-open your ticket based on the results you've posted here.
BPM Company
NL
Done! Let's wait and see.
BPM Company
NL
An enhancement is created for this: FDBK-22765
It is said to be released in 7.3.1 or 7.4.
Since 7.3.1 is released, i would like to know if this is fixed there?
Pegasystems Inc.
IN
Hello!
Here's where you could check this: Release Notes
Additionally, the What's new page on PDN: Pega Platform 7.3.1
Regards,
BPM Company
NL
Hi Lochana,
I already checked it there, but couldn't find it. The person handling the SR (Sergei Moisseyev) told me it would be fixed either in 7.3.1 or 7.4 with the enhancement mentioned earlier. But there is no way for me to check the enhancement myself witg pega, so he told me to ask for it on the community.
Is there someone who can confirm if ticket FDBK-22765 is fixed in 7.3.1 or will be fixed in 7.4?
Pegasystems Inc.
IN
Hi Again!
On our internal portal FDBK-22765 shows that it is not resolved. The best way forward is to talk to your Account Executive who will be able to get this information for you. Release timelines or features of a future release might be considered internal and not shared on our community.
Thanks for your understanding,
-
Guangri Liang
Pegasystems Inc.
US
I've updated FDBK-22765 to reflect the fact that I addressed it as part of the Pega 7.3.1 release.
Pegasystems Inc.
IN
Thanks Jeff!
Accepted Solution
Pegasystems Inc.
US
If you are using Pega 7.3.1 or later, you should be able to find the HTTP status text on the parameter page after calling the REST Connector.
The parameter name is pyHTTPStatusLine.
BPM Company
NL
Thanks!
We will upgrade asap to see this new feature!
BPM Company
NL
Tested it and works as expected in 7.3.1!
Thanks guys!