From c3dd761b810b457ad56fae4a3aaac89335161454 Mon Sep 17 00:00:00 2001 From: Frank Denis Date: Fri, 11 Aug 2023 12:07:13 +0200 Subject: [PATCH] Make error more explicit --- dnscrypt-proxy/xtransport.go | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/dnscrypt-proxy/xtransport.go b/dnscrypt-proxy/xtransport.go index c4a68c0a..e0efd780 100644 --- a/dnscrypt-proxy/xtransport.go +++ b/dnscrypt-proxy/xtransport.go @@ -462,7 +462,13 @@ func (xTransport *XTransport) resolveAndUpdateCache(host string) error { } } if foundIP == nil { - dlog.Errorf("no IP address found for [%s]", host) + if !xTransport.useIPv4 && xTransport.useIPv6 { + dlog.Warnf("no IPv6 address found for [%s]", host) + } else if xTransport.useIPv4 && !xTransport.useIPv6 { + dlog.Warnf("no IPv4 address found for [%s]", host) + } else { + dlog.Errorf("no IP address found for [%s]", host) + } } xTransport.saveCachedIP(host, foundIP, ttl) dlog.Debugf("[%s] IP address [%s] added to the cache, valid for %v", host, foundIP, ttl)