summaryrefslogtreecommitdiff
path: root/lib/dns.js
diff options
context:
space:
mode:
authorRuben Bridgewater <ruben@bridgewater.de>2018-04-01 07:54:32 +0200
committerRuben Bridgewater <ruben@bridgewater.de>2018-04-05 19:29:02 +0200
commitb29c36b80746733994257b7380245102bc3c4cd6 (patch)
tree45da31a1c54ccf272c251e741696d84b66f64c63 /lib/dns.js
parent22da2f731d90235289a95bffe1ae3750a62a33bc (diff)
downloadnode-new-b29c36b80746733994257b7380245102bc3c4cd6.tar.gz
errors: make dns errors consistent
Right now the hostname could in some cases be missed, depending on the libuv error number. This makes sure there the hostname is always added, if available. PR-URL: https://github.com/nodejs/node/pull/19754 Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'lib/dns.js')
-rw-r--r--lib/dns.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/dns.js b/lib/dns.js
index cb8b2ca0be..fdfcec2e7e 100644
--- a/lib/dns.js
+++ b/lib/dns.js
@@ -229,7 +229,7 @@ function resolver(bindingName) {
req.oncomplete = onresolve;
req.ttl = !!(options && options.ttl);
var err = this._handle[bindingName](req, name);
- if (err) throw dnsException(err, bindingName);
+ if (err) throw dnsException(err, bindingName, name);
return req;
}
Object.defineProperty(query, 'name', { value: bindingName });