For several days I'm seeing intermittent error while making call to Postman API to fetch collections or Environment. However, most often, if you run it again, it works fine.
The code is straightforward (using Node):
collections
const response = await axios.get(`https://api.getpostman.com/collections/${collectionId}?apikey=${key}`)
Error (failing to load collection intermittently)
Error: collection could not be loaded unable to fetch data from url "https://api.getpostman.com/collections/<id>?apikey=<key>"
getaddrinfo ENOTFOUND api.getpostman.com
environment
const response = await axios.get(`https://api.getpostman.com/environments/${environmentId}?apikey=${apiKey}`)
Error (failing to load Environment intermittently):
run-try-err Error: could not load environment
Something went wrong with the server.
at done (/Users/deepakaggarwal/Documents/Projects/newman-runner/node_modules/newman/lib/run/options.js:119:40)
at /Users/deepakaggarwal/Documents/Projects/newman-runner/node_modules/newman/lib/run/options.js:79:24
...
What could be the reason of this intermittent issue? Is there a problem with Postman APIs?