Issue with getting the response body and https status code from interaction response
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 09:23 PM
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 09:51 PM
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-20-2024 10:21 PM
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.