Skip to content

improve error messge in lib/dns #3891

@MylesBorins

Description

@MylesBorins

Due to backwards compatibility dns.js is reporting UV_EAI_MEMORY, UV_EAI_NODATA, and UV_EAI_NONAME errors as ENOTFOUND

This is currently labelled FIXME --> https://github.com/nodejs/node/blob/master/lib/dns.js#L17-L23

ENOTFOUND is not even a proper POSIX error!
@bnoordhuis

The change breaks a few tests

  • test-http-dns-error
  • test-net-better-error-messages-port-hostname
  • test-net-connect-immediate-finish
  • test-net-dns-error

interestingly enough every testc ase we had was for EAI_NONAME, we have no tests for EAI_MEMORY or EAI_NODATA

If people are interested I'll get started on this change, including writing extra tests and smoke testing. This should be a great candidate for citgm

Metadata

Metadata

Assignees

No one assigned

    Labels

    dnsIssues and PRs related to the dns subsystem.semver-majorPRs that contain breaking changes and should be released in the next major version.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions