Skip to content

dns: return real system error instead of 'ENOTFOUND'

Rodrigo Muino Tomonari requested to merge github/fork/ncopa/dns-error-codes into master

Return the real system error to user insetad of injecting 'ENOTFOUND' which is not a proper POSIX error.

https://github.com/nodejs/node/pull/5099#issuecomment-181538896

Also fix the test suite to check for the corresponding error message.

The hostname '...' was replaced with '***' because '...' returns inconsistent error message on different system. On GNU libc it intantly returns EAI_NONAME but on musl libc it returns EAI_AGAIN after a timeout.

Merge request reports

Loading