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

I was wondering if it would be worth creating more robust error responses when a query fails? #113

Open
borosilicate opened this issue Dec 7, 2023 · 1 comment

Comments

@borosilicate
Copy link

As an example of code that fails but could give more helpful responses.
query('8.8.8.8', 'PTR')
This on the other hand works.
query('8.8.8.8.in-addr.arpa.','PTR')
If a user is new to the using the library and a response returns no output. It could recommend trying resolvehostbyaddr().
Alternatively it could recommend flipping the ip string and adding .in-addr.arpa before running a query.
ip=ip[::-1]+'.in-addr.arpa.'
I was wondering what you thought about adding this to help beginners with using your library?

@saghul
Copy link
Owner

saghul commented Dec 7, 2023

I think gioving an error if the query is not properly formatted (like if it's missing in-addr.arpa. for example) would be usedult yeah.

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