Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: improve propagation check error messages #2306

Merged
merged 1 commit into from
Oct 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions challenge/dns01/precheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)
}
}

Expand All @@ -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.
Expand Down