node-rest-client
node-rest-client copied to clipboard
please handle Error: getaddrinfo EAI_AGAIN dummysite.com
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?
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);
});