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

Improve error reporting when query fails, include domain and query type and DNS server address where applicable #174

Merged
merged 3 commits into from
Mar 1, 2021

Conversation

clue
Copy link
Member

@clue clue commented Mar 1, 2021

This changeset improves error reporting when a query fails. The exception message now always includes domain and query type and the DNS server address where applicable.

For example:

- DNS query for google.com failed: Connection to DNS server rejected
+ DNS query for google.com (AAAA) failed: Unable to connect to DNS server tcp://8.8.8.8:53 (No route to host)

This makes it much easier to debug in case of an error (#173, reactphp/socket#230, beyondcode/expose#25 and others). Additionally, I consider this to be a prerequisite for future multiple DNS servers (#6) that will be added in a follow-up PR. This is a pure future addition that works across all supported platforms and does not affect BC.

Builds on top of #171 and #172

@clue clue added this to the v1.5.0 milestone Mar 1, 2021
@clue clue requested review from jsor and WyriHaximus March 1, 2021 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants