Issue with getting the response body and https status code from interaction response

Meenakshi Rajes
Tera Expert

Hi All,

 

We have a requirement to automate a task based on the response from the vendor. 

For that I have configured the Rest message and getting the status code and response body, based on the status code I'm automating the task.

The configuration is working as expected.

But we are facing any issue like some times the code is not taking the response body and https status code, because of that the automation is getting failure.

When I check the ecc queue, I'm able to see the data there. The output and input is there and also I'm getting the expected data in the ecc queue; the response body and status code is also looks good in ecc queue.

 

The function we used is getBody() and getStatusCode().

 

Anyone knows what the issue will be here.

 

Thanks for your time in Advance!

 

 

2 REPLIES 2

karthiknagaramu
Kilo Sage

Hi,

There could be a pattern because of which it is failing some time. Would you be able to add a log statement to print the status code? 

If you can do so and monitor the logs, probably it will help to identify an pattern when it is failing.

 

Regards,

Karthik Nagaramu

Yes, I tried to print the status code and body from the script but that is empty, it's not holding any data.

 

The request is to schedule VM, so if we are sending the request to 1 vm its working fine, but for multiple VM its sending the response to ServiceNow and im able to see the data in ECC queue, but script is not taking the response,

Can you please give me more info regarding the patterns which you mentioned.