Need to display error message instead of 400 bad request

I'm calling a 3rd party API

Upon success it will return json while upon failure it will just return a string

I have map the api to consume in outsystem and it auto assign the response to a structure

I would like to display the failure string instead of "400 bad request" now

Solution

Hi Lim Xinyao,

You can use OnAfterResponse action in the api call for to manipulate your response.

 for further information and how to use this action check this link https://success.outsystems.com/Documentation/11/Extensibility_and_Integration/REST/Expose_REST_APIs/Customize_REST_API_Responses

Regards

Poonam