From f9c1e241f3ab4210642aeb47bed72899ef115cc8 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Mon, 17 Feb 2025 16:00:22 +0100 Subject: [PATCH] acme-dns: continue the process when the CNAME is handled by the storage (#2443) --- providers/dns/acmedns/acmedns.go | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/providers/dns/acmedns/acmedns.go b/providers/dns/acmedns/acmedns.go index 8dedeb128..15e0a1da7 100644 --- a/providers/dns/acmedns/acmedns.go +++ b/providers/dns/acmedns/acmedns.go @@ -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.