1
0
mirror of https://github.com/go-acme/lego.git synced 2025-01-03 07:19:39 +02:00

feat: improve propagation check error messages (#2306)

This commit is contained in:
Ludovic Fernandez 2024-10-14 13:13:24 +02:00 committed by GitHub
parent ee445c0c2e
commit 895a953590
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -86,7 +86,7 @@ func (p preCheck) checkDNSPropagation(fqdn, value string) (bool, error) {
// Initial attempt to resolve at the recursive NS (require to get CNAME)
r, err := dnsQuery(fqdn, dns.TypeTXT, recursiveNameservers, true)
if err != nil {
return false, err
return false, fmt.Errorf("initial recursive nameserver: %w", err)
}
if r.Rcode == dns.RcodeSuccess {
@ -96,7 +96,7 @@ func (p preCheck) checkDNSPropagation(fqdn, value string) (bool, error) {
if p.requireRecursiveNssPropagation {
_, err = checkNameserversPropagation(fqdn, value, recursiveNameservers, false)
if err != nil {
return false, err
return false, fmt.Errorf("recursive nameservers: %w", err)
}
}
@ -109,7 +109,12 @@ func (p preCheck) checkDNSPropagation(fqdn, value string) (bool, error) {
return false, err
}
return checkNameserversPropagation(fqdn, value, authoritativeNss, true)
found, err := checkNameserversPropagation(fqdn, value, authoritativeNss, true)
if err != nil {
return found, fmt.Errorf("authoritative nameservers: %w", err)
}
return found, nil
}
// checkNameserversPropagation queries each of the given nameservers for the expected TXT record.