How to automate a request which doesn't give response on the first attempt. It throws Error: getaddrinfo ENOTFOUND {{domainname}}

That’s certainly an interesting problem to have. :thinking:

It would be ideal to get to the root of the problem and not have to do anything with retries like Ian is trying to help with.

But another possible solution to implement a version of retrying a request could be to use postman.setNextRequest(request.name) behind some kind of check with a counter to loop only a certain number of times until you get a response and postman.setNextRequest(null) after the 10th request for example.

Here’s a sample I was able to find that demonstrates this for you :smile:

1 Like