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

A separate code for NODATA #29

Open
bortzmeyer opened this issue Aug 1, 2019 · 1 comment
Open

A separate code for NODATA #29

bortzmeyer opened this issue Aug 1, 2019 · 1 comment

Comments

@bortzmeyer
Copy link

bortzmeyer commented Aug 1, 2019

Today, when the domain name does not exist, DNS.resolve() returns {:error, :not_found}. But it also returns the same when the name exists, but does not have the required type (DNS.resolve("github.com", :aaaa), for instance).

At the very least, this calls for two separate codes (something like {:error, :no_data} but I would prefer {:ok, :no_data}since it is not an error).

The only workaround seems to be using DNS.query(), which is at a lower level.

@tungd
Copy link
Owner

tungd commented Aug 6, 2019

Sounds very reasonable to me, will get it done by the weekend. Thanks

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