Skip to content
Merged
Changes from 1 commit
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
5 changes: 2 additions & 3 deletions providers/dns/acmedns/acmedns.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,14 +171,13 @@ 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 err != nil && !errors.Is(err, internal.ErrCNAMEAlreadyCreated) {
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)
}

// Errors other than goacmedns.ErrDomainNotFound are unexpected.
return err
}

Expand Down Expand Up @@ -221,7 +220,7 @@ func (d *DNSProvider) register(ctx context.Context, domain, fqdn string) error {
}

if cnameCreated {
return nil
return internal.ErrCNAMEAlreadyCreated
}

// Stop issuance by returning an error.
Expand Down