Did you try $latestHttpResponse? https://docs.mendix.com/refguide/call-rest-action#latesthttpresponse