I'm trying to get the data into workflow transition from external API service.
Below is the code snippet to call the API for each record.
//function to call the api and return the response
http = new HttpClientRequest(url);
http.method = 'GET';
var response = http.execute();
return "Exception occured in ACM "+e +" for URL "+url;
logInfo("Exception occured in ACM "+e +" for URL "+url);
if(http.response !== undefined && http.response.code === 200)
var res_body = JSON.parse(http.response.body);
var status = res_body.response.status;
var details = res_body.response.details;
var r_id = res_body.response.id;
var code = http.response.code;
return 'something went wrong '+code +" http code";
But, This Code gets into exception sometimes and in exception object e only error code number is returned.
The exception code which I got is -60.
and as per the documentation, the exception object will only return the number.