Marco Maciel (marco.maciel)
Software Consultant
marco.maciel Member since 2015 1 post
Posted: November 24, 2020
Last activity: January 24, 2021
Posted: 24 Nov 2020 10:24 EST
Last activity: 24 Jan 2021 19:25 EST

HTTP response from REST API

Hi all, I'm facing a strange situation using Pega API, that as not happening before.

I'm using Pega API to cretate test some business scenarios.

One of the scenarios should check if the response is like below... Validating if the property was not fulfilled...

    "pxObjClass": "Pega-API-CaseManagement-Assignment",
    "errors": [
            "ID": "Pega_API_055",
            "message": "Validation message found.",
            "pxObjClass": "Pega-API-Error",
            "ValidationMessages": [
                    "Path": ".ClientRequest.Content",
                    "pxObjClass": "Pega-API-Error-ValidationMessage",
                    "ValidationMessage": "This field may not be blank"

It was working fine. 


But after some updates the response from the REST request I'm getting is an HTML similar that one...

<html><head> <title> Bad request </title> </head> <body> <p> We are sorry, but the request you have sent does not match the expected format. </ p > <p> If you think the request content is correct, please try again. </p> </body> </html>  

When I check the log I see that message. That shows that the REST error code I was expecting is there.  

API error for C204810: Pega_API_055: .ClientRequest.Content: This field may not be blank.

Looks like now, when something goes wrong (doesn't matter is its a real bad request or a validation) instead of replying as JSON, Pega is sending that generic HTML message.

Does anyone have any idea what may be going on? ***Edited by Moderator Kayla to update Platform Capability tags****


Pega Platform 8.4.2 Robotic Process Automation