getURL and postURL not returning response body for 500 response

getURL and postURL not returning response body for 500 response

I have set up a temporary rest endpoint that returns a 500 error and some json to explain the reason for the 500 error.

http://demo3516469.mockable.io/test500

This is common behaviour for many REST APIs to return a 500 error if something is not right and display a reason.

The following test function:

void testREST()
{
getRestResponse = getUrl("http://demo3516469.mockable.io/test500",false);
postRestResponse = postUrl("http://demo3516469.mockable.io/test500", "{\"test\":\"test\"}",false);
info getRestResponse;
info postRestResponse;
}

Returns:

Executed Successfully
Log messages:
{"responseCode":"500","responseText":"The server encountered an unexpected condition which prevented it from fulfilling the request."}
{"responseCode":"500","responseText":"The server encountered an unexpected condition which prevented it from fulfilling the request."}

The response text should instead be what is returned from the web service which is:

{ "msg":"this should be returned as response body" }
Is it possible that this could be fixed. It is causing a number of problems with interacting with external rest apis.