node-rest-client icon indicating copy to clipboard operation
node-rest-client copied to clipboard

please handle Error: getaddrinfo EAI_AGAIN dummysite.com

Open Succubussix opened this issue 8 years ago • 1 comments

example on localhost if you turn your wifi off

and he will throw events.js:163 throw er; // Unhandled 'error' event ^

Error: getaddrinfo EAI_AGAIN dummysite.com at Object.exports._errnoException (util.js:1033:11) at errnoException (dns.js:33:15) at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:73:26)

if on live server i need to watch the server :( .. is any method to catch that?

Succubussix avatar May 17 '17 10:05 Succubussix

From README

...

//it's usefull to handle request errors to avoid, for example, socket hang up errors on request timeouts
req.on('error', function (err) {
	console.log('request error', err);
});

roboli avatar Jun 03 '17 13:06 roboli