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

suggestion: domain input validation #35

Open
andrzej-woof opened this issue Nov 18, 2022 · 1 comment
Open

suggestion: domain input validation #35

andrzej-woof opened this issue Nov 18, 2022 · 1 comment

Comments

@andrzej-woof
Copy link

passing values that are not a valid domain cause various errors to be returned e.g.:

  • google..com -> dig: 'google..com' is not a legal name (empty label)
  • await dnsRecords.getDnsRecords([null, 'google.com'], 'MX') -> Error: ;; Warning, extra type option

I assume there might be more. This is a bit painful when dealing with large arrays since the entire batch is rejected if one entry is invalid.

@AndreiIgna
Copy link
Member

hey @andrzej-woof the v2 of the library has some basic domain checking now. v2 comes with some breaking changes too, so check out the full change log too.
Maybe this is helpful if you're still using it

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