Use rcode string in error message

So it's clearer what went wrong.
This commit is contained in:
Cuong Manh Le
2023-03-17 21:46:51 +07:00
committed by Cuong Manh Le
parent aad04200cb
commit 8ffb42962a

View File

@@ -185,7 +185,7 @@ func (uc *UpstreamConfig) SetupBootstrapIP() {
return
}
if r.Rcode != dns.RcodeSuccess {
ProxyLog.Error().Msgf("could not resolve domain return code: %d, upstream", r.Rcode)
ProxyLog.Error().Msgf("could not resolve domain %q, return code: %s", uc.Domain, dns.RcodeToString[r.Rcode])
return
}
if len(r.Answer) == 0 {