Hi Team,
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
function apiCall(url)
{
var http;
try{
http = new HttpClientRequest(url);
http.method = 'GET';
var response = http.execute();
}
catch(e){
http.disconnect();
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;
http.disconnect();
return res_body;
}
else{
var code = http.response.code;
http.disconnect();
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.
doc link: https://docs.adobe.com/content/help/en/campaign-classic/technicalresources/api/p-4.html
I just want to know the reason for this exception. or is there any documentation available for these exceptions codes.
so, that I can handle this exception accordingly.
Thanks in advance!!
Regards,
Nitesh.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Views
Replies
Total Likes
I didn't found any documentation for these Exception codes. but, the only exception we were facing was -60 so, we applied some hardcoded conditions to handle this exception.
and as per observation, this exception was occurred due to the network error on the instance.
Views
Replies
Total Likes
assume that you have whitelisted URLwhich you are hitting bellow.
Make some debuging by yourself. Call part of this function from the workflow within JS node with logInfo(http.execute()) where you will get more info about exception.
Hopefully, the new error you may find in this list: Error codes AC
Regards,
Milan
Views
Replies
Total Likes
Hi @nitesha38268385,
were you able to resolve this query with the given solution? Do let us know.
Thanks!
Views
Replies
Total Likes
I didn't found any documentation for these Exception codes. but, the only exception we were facing was -60 so, we applied some hardcoded conditions to handle this exception.
and as per observation, this exception was occurred due to the network error on the instance.
Views
Replies
Total Likes