Possible to map the statuscode and statustext from a web request that does not throw an exception

Is it possible to map the values outside the “rawData” field in a JSON response from a web request. For instance I am looking for the “status” field here.

"responseData": {
		"status": 200,
		"statusText": "OK",
		"rawData": {

I’ve tried with the body parser to add a field called “httpcode” in the following ways, but no luck.

//rawResponseData.httpcode = rawResponseData.status;
rawResponseData.httpcode = responseCode;

return rawResponseData;

Hi! You have access to the Code (200) the following way:

Result parser:
rawResponseData.responseCode = responseCode
return rawResponseData

Result mapping (example, mapping to app variables, there the web request simply returns { “Success”:true} ):

The statusText is not available, but I believe it’s quite standard. Also, other codes then 200 will typically throw a exception, and you may catch then using catch exception (and use the value mapping in the catch exception action node)

1 Like

Thank you! The API I am using are using some codes in the 200 range that should be handled on my end in the same way as the exception codes so this is very helpful.