Repository navigation
Shouldn't DNS error code 'EADNAME' be 'EBADNAME'? #3050
Description
Activity
The doc mentions
BADNAME: https://nodejs.org/api/dns.html#dns_error_codes- addeddnsIssues and PRs related to the dns subsystem.Issues and PRs related to the dns subsystem.
on Sep 24, 2015 Looks like an mistake in ecfe32e. This change would be a semver-major.
(Unless that error code isn't returned by the API)
@silverwind Adding
exports.BADNAMEwould be asemver-minor, removingexports.ADNAMEwould be asemver-majorin any case (even if not returned by the API). So I would prefer that to be two separate commits, one of which could be pulled in 4.x.What are these exports actually used for exactly? They don't seem to be involved in actual error handling. They certainly are undocumented, so semver rules don't strictly apply.
cc: @piscisaureus who added them in 858f230
Oh, right, comparison. Well, I think a replacement here would qualify as a bugfix to match the documentation, so I think it'd be fine in a patch release actually.
Filed #3051.
Agreed that if the documented result doesn't match how the code works then it's a bug fix.
- added 2 commits that reference this issue
on Sep 27, 2015 Landed in two seperate commits.
exports.BADNAMEwill be available next version.exports.ADNAMEwill be removed in 5.0.0.- added 2 commits that reference this issue
on Sep 30, 2015 - added 2 commits that reference this issue
on Jan 14, 2016 - added a commit that references this issue
on Jul 27, 2026
See https://github.com/nodejs/node/blob/master/lib/dns.js#L333
This line defines the error code
ADNAMEas'EADNAME'. Shouldn't it beBADNAMEand'EBADNAME'respectively?