Skip to content

dns.lookup() documentation error code #27604

@nfearnley

Description

@nfearnley
  • Version: v11.15.0
  • Platform: N/A
  • Subsystem: N/A

The nodejs documentation for dns.lookup() seems to imply that the error will ENOENT, if a domain is not found. Should this be ENOTFOUND instead?

https://nodejs.org/docs/latest-v11.x/api/dns.html#dns_dns_lookup_hostname_options_callback

"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 the hostname does not exist but also when the lookup fails in other ways such as no available file descriptors."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions