clue · GitHub

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, exposedev/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

Read the original on github.com ↗