Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dns.resolveMx // undefined #79

Open
sebwaks opened this issue Sep 15, 2014 · 4 comments
Open

dns.resolveMx // undefined #79

sebwaks opened this issue Sep 15, 2014 · 4 comments

Comments

@sebwaks
Copy link

sebwaks commented Sep 15, 2014

Great module but see code bellow

var domain ='idonexist';
dns.resolveMx(domain, function (err, dnsresults) {
if (err) {
console.log(err);

                            } else {
                                console.log(dnsresults); //undefined

                            }
                        });

native-dns doesnt return err when domain does not exist , oob dns module does .
It's would be nice to have it

update oob dns returns

{ [Error: queryMx ENODATA] code: 'ENODATA', errno: 'ENODATA', syscall: 'queryMx' }

@mwmahlberg
Copy link

Right, NX isn't neither undefined nor an error.

@sebwaks
Copy link
Author

sebwaks commented Sep 16, 2014

My suggestion shuld be ERROR

@mwmahlberg
Copy link

RFC says otherwise. Errors are reserved for the case that the resolver has an an internal error. But if it can't resolve the query, the supposed answer is NXDOMAIN for the example given. And of course it is different for the application if the resolver is broken or if it can't resolve the query.

@sebwaks
Copy link
Author

sebwaks commented Sep 16, 2014

ok :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants