Skip to content

Commit f9c1e24

Browse files
authored
acme-dns: continue the process when the CNAME is handled by the storage (#2443)
1 parent c341388 commit f9c1e24

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

providers/dns/acmedns/acmedns.go

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -172,14 +172,16 @@ func (d *DNSProvider) Present(domain, _, keyAuth string) error {
172172
// Check if credentials were previously saved for this domain.
173173
account, err := d.storage.Fetch(ctx, domain)
174174
if err != nil {
175-
if errors.Is(err, storage.ErrDomainNotFound) {
176-
// The account did not exist.
177-
// Create a new one and return an error indicating the required one-time manual CNAME setup.
178-
return d.register(ctx, domain, info.FQDN)
175+
if !errors.Is(err, storage.ErrDomainNotFound) {
176+
return err
179177
}
180178

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

185187
// Update the acme-dns TXT record.

0 commit comments

Comments
 (0)