Skip to content

Commit

Permalink
acme-dns: continue the process when the CNAME is handled by the stora…
Browse files Browse the repository at this point in the history
…ge (#2443)
  • Loading branch information
ldez authored Feb 17, 2025
1 parent c341388 commit f9c1e24
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions providers/dns/acmedns/acmedns.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,16 @@ func (d *DNSProvider) Present(domain, _, keyAuth string) error {
// Check if credentials were previously saved for this domain.
account, err := d.storage.Fetch(ctx, domain)
if err != nil {
if errors.Is(err, storage.ErrDomainNotFound) {
// The account did not exist.
// Create a new one and return an error indicating the required one-time manual CNAME setup.
return d.register(ctx, domain, info.FQDN)
if !errors.Is(err, storage.ErrDomainNotFound) {
return err
}

// Errors other than goacmedns.ErrDomainNotFound are unexpected.
return err
// The account did not exist.
// Create a new one and return an error indicating the required one-time manual CNAME setup.
err = d.register(ctx, domain, info.FQDN)
if err != nil {
return err
}
}

// Update the acme-dns TXT record.
Expand Down

0 comments on commit f9c1e24

Please sign in to comment.