diff options
author | jvelezpo <sebasvelez@gmail.com> | 2019-05-09 10:07:22 -0500 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-05-13 16:57:07 -0700 |
commit | fd8d5e7d9e212f2d395798d1308280da2e6f3755 (patch) | |
tree | cfee22adc4182d500a1f9faa580f90ac49631ea9 /doc | |
parent | 815b3aa8332479a99f06327d76492b887b1b1edf (diff) | |
download | android-node-v8-fd8d5e7d9e212f2d395798d1308280da2e6f3755.tar.gz android-node-v8-fd8d5e7d9e212f2d395798d1308280da2e6f3755.tar.bz2 android-node-v8-fd8d5e7d9e212f2d395798d1308280da2e6f3755.zip |
doc: dns.lookup() documentation error code
dns.lookup() will always return ENOTFOUND on a empty lookup
or when the host not found.
https://github.com/nodejs/node/blob/master/lib/internal/errors.js#L503
Fixes: https://github.com/nodejs/node/issues/27604
PR-URL: https://github.com/nodejs/node/pull/27625
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/api/dns.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/api/dns.md b/doc/api/dns.md index 22899e625c..22bca079c3 100644 --- a/doc/api/dns.md +++ b/doc/api/dns.md @@ -168,7 +168,7 @@ With the `all` option set to `true`, the arguments for `callback` change to properties `address` and `family`. On error, `err` is an [`Error`][] object, where `err.code` is the error code. -Keep in mind that `err.code` will be set to `'ENOENT'` not only when +Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when the hostname does not exist but also when the lookup fails in other ways such as no available file descriptors. @@ -692,7 +692,7 @@ being an array of objects with the properties `address` and `family`. On error, the `Promise` is rejected with an [`Error`][] object, where `err.code` is the error code. -Keep in mind that `err.code` will be set to `'ENOENT'` not only when +Keep in mind that `err.code` will be set to `'ENOTFOUND'` not only when the hostname does not exist but also when the lookup fails in other ways such as no available file descriptors. |