Add hostname to dns exception

Without this patch the exception message on dns failures looks like:

DNS resolution failed after 300 seconds (RuntimeError)

This patch adds the hostname, possibly helpful for troubleshooting infrastructure failures.