Skip to content
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
7 changes: 4 additions & 3 deletions providers/dns/ionos/ionos.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"errors"
"fmt"
"net/http"
"strconv"
"strings"
"time"

Expand Down Expand Up @@ -171,16 +172,16 @@ func (d *DNSProvider) CleanUp(domain, _, keyAuth string) error {
}

for _, record := range records {
if record.Name == dns01.UnFqdn(info.EffectiveFQDN) && record.Content == info.Value {
err := d.client.RemoveRecord(ctx, zone.ID, record.ID)
if record.Name == dns01.UnFqdn(info.EffectiveFQDN) && record.Content == strconv.Quote(info.Value) {
err = d.client.RemoveRecord(ctx, zone.ID, record.ID)
if err != nil {
return fmt.Errorf("ionos: failed to remove record (zone=%s, record=%s): %w", zone.ID, record.ID, err)
}
return nil
}
}

return nil
return fmt.Errorf("ionos: failed to remove record, record not found (zone=%s, domain=%s, fqdn=%s, value=%s)", zone.ID, domain, info.EffectiveFQDN, info.Value)
}

func findZone(zones []internal.Zone, domain string) *internal.Zone {
Expand Down