feat: improve errors and logs related to DNS call (#2109)

This commit is contained in:
Ludovic Fernandez 2024-02-11 14:37:09 +01:00 committed by GitHub
parent 7fe1796157
commit ba67a265c0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
87 changed files with 320 additions and 188 deletions

View file

@ -6,6 +6,7 @@ import (
"fmt"
"os"
"strconv"
"strings"
"time"
"github.com/go-acme/lego/v4/acme"
@ -124,7 +125,7 @@ func (c *Challenge) Solve(authz acme.Authorization) error {
timeout, interval = DefaultPropagationTimeout, DefaultPollingInterval
}
log.Infof("[%s] acme: Checking DNS record propagation using %+v", domain, recursiveNameservers)
log.Infof("[%s] acme: Checking DNS record propagation. [nameservers=%s]", domain, strings.Join(recursiveNameservers, ","))
time.Sleep(interval)

View file

@ -25,7 +25,7 @@ func (*DNSProviderManual) Present(domain, token, keyAuth string) error {
authZone, err := FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return err
return fmt.Errorf("manual: could not find zone: %w", err)
}
fmt.Printf("lego: Please create the following TXT record in your %s zone:\n", authZone)
@ -33,8 +33,11 @@ func (*DNSProviderManual) Present(domain, token, keyAuth string) error {
fmt.Printf("lego: Press 'Enter' when you are done\n")
_, err = bufio.NewReader(os.Stdin).ReadBytes('\n')
if err != nil {
return fmt.Errorf("manual: %w", err)
}
return err
return nil
}
// CleanUp prints instructions for manually removing the TXT record.
@ -43,7 +46,7 @@ func (*DNSProviderManual) CleanUp(domain, token, keyAuth string) error {
authZone, err := FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return err
return fmt.Errorf("manual: could not find zone: %w", err)
}
fmt.Printf("lego: You can now remove this TXT record from your %s zone:\n", authZone)

View file

@ -99,12 +99,12 @@ func lookupNameservers(fqdn string) ([]string, error) {
zone, err := FindZoneByFqdn(fqdn)
if err != nil {
return nil, fmt.Errorf("could not determine the zone: %w", err)
return nil, fmt.Errorf("could not find zone: %w", err)
}
r, err := dnsQuery(zone, dns.TypeNS, recursiveNameservers, true)
if err != nil {
return nil, err
return nil, fmt.Errorf("NS call failed: %w", err)
}
for _, rr := range r.Answer {
@ -116,7 +116,8 @@ func lookupNameservers(fqdn string) ([]string, error) {
if len(authoritativeNss) > 0 {
return authoritativeNss, nil
}
return nil, errors.New("could not determine authoritative nameservers")
return nil, fmt.Errorf("[zone=%s] could not determine authoritative nameservers", zone)
}
// FindPrimaryNsByFqdn determines the primary nameserver of the zone apex for the given fqdn
@ -130,7 +131,7 @@ func FindPrimaryNsByFqdn(fqdn string) (string, error) {
func FindPrimaryNsByFqdnCustom(fqdn string, nameservers []string) (string, error) {
soa, err := lookupSoaByFqdn(fqdn, nameservers)
if err != nil {
return "", err
return "", fmt.Errorf("[fqdn=%s] %w", fqdn, err)
}
return soa.primaryNs, nil
}
@ -146,7 +147,7 @@ func FindZoneByFqdn(fqdn string) (string, error) {
func FindZoneByFqdnCustom(fqdn string, nameservers []string) (string, error) {
soa, err := lookupSoaByFqdn(fqdn, nameservers)
if err != nil {
return "", err
return "", fmt.Errorf("[fqdn=%s] %w", fqdn, err)
}
return soa.zone, nil
}
@ -171,35 +172,35 @@ func lookupSoaByFqdn(fqdn string, nameservers []string) (*soaCacheEntry, error)
func fetchSoaByFqdn(fqdn string, nameservers []string) (*soaCacheEntry, error) {
var err error
var in *dns.Msg
var r *dns.Msg
labelIndexes := dns.Split(fqdn)
for _, index := range labelIndexes {
domain := fqdn[index:]
in, err = dnsQuery(domain, dns.TypeSOA, nameservers, true)
r, err = dnsQuery(domain, dns.TypeSOA, nameservers, true)
if err != nil {
continue
}
if in == nil {
if r == nil {
continue
}
switch in.Rcode {
switch r.Rcode {
case dns.RcodeSuccess:
// Check if we got a SOA RR in the answer section
if len(in.Answer) == 0 {
if len(r.Answer) == 0 {
continue
}
// CNAME records cannot/should not exist at the root of a zone.
// So we skip a domain when a CNAME is found.
if dnsMsgContainsCNAME(in) {
if dnsMsgContainsCNAME(r) {
continue
}
for _, ans := range in.Answer {
for _, ans := range r.Answer {
if soa, ok := ans.(*dns.SOA); ok {
return newSoaCacheEntry(soa), nil
}
@ -208,11 +209,11 @@ func fetchSoaByFqdn(fqdn string, nameservers []string) (*soaCacheEntry, error) {
// NXDOMAIN
default:
// Any response code other than NOERROR and NXDOMAIN is treated as error
return nil, fmt.Errorf("unexpected response code '%s' for %s", dns.RcodeToString[in.Rcode], domain)
return nil, &DNSError{Message: fmt.Sprintf("unexpected response for '%s'", domain), MsgOut: r}
}
}
return nil, fmt.Errorf("could not find the start of authority for %s%s", fqdn, formatDNSError(in, err))
return nil, &DNSError{Message: fmt.Sprintf("could not find the start of authority for '%s'", fqdn), MsgOut: r, Err: err}
}
// dnsMsgContainsCNAME checks for a CNAME answer in msg.
@ -226,16 +227,28 @@ func dnsMsgContainsCNAME(msg *dns.Msg) bool {
func dnsQuery(fqdn string, rtype uint16, nameservers []string, recursive bool) (*dns.Msg, error) {
m := createDNSMsg(fqdn, rtype, recursive)
var in *dns.Msg
if len(nameservers) == 0 {
return nil, &DNSError{Message: "empty list of nameservers"}
}
var r *dns.Msg
var err error
var errAll error
for _, ns := range nameservers {
in, err = sendDNSQuery(m, ns)
if err == nil && len(in.Answer) > 0 {
r, err = sendDNSQuery(m, ns)
if err == nil && len(r.Answer) > 0 {
break
}
errAll = errors.Join(errAll, err)
}
return in, err
if err != nil {
return r, errAll
}
return r, nil
}
func createDNSMsg(fqdn string, rtype uint16, recursive bool) *dns.Msg {
@ -253,37 +266,82 @@ func createDNSMsg(fqdn string, rtype uint16, recursive bool) *dns.Msg {
func sendDNSQuery(m *dns.Msg, ns string) (*dns.Msg, error) {
if ok, _ := strconv.ParseBool(os.Getenv("LEGO_EXPERIMENTAL_DNS_TCP_ONLY")); ok {
tcp := &dns.Client{Net: "tcp", Timeout: dnsTimeout}
in, _, err := tcp.Exchange(m, ns)
r, _, err := tcp.Exchange(m, ns)
if err != nil {
return r, &DNSError{Message: "DNS call error", MsgIn: m, NS: ns, Err: err}
}
return in, err
return r, nil
}
udp := &dns.Client{Net: "udp", Timeout: dnsTimeout}
in, _, err := udp.Exchange(m, ns)
r, _, err := udp.Exchange(m, ns)
if in != nil && in.Truncated {
if r != nil && r.Truncated {
tcp := &dns.Client{Net: "tcp", Timeout: dnsTimeout}
// If the TCP request succeeds, the "err" will reset to nil
in, _, err = tcp.Exchange(m, ns)
}
return in, err
}
func formatDNSError(msg *dns.Msg, err error) string {
var parts []string
if msg != nil {
parts = append(parts, dns.RcodeToString[msg.Rcode])
r, _, err = tcp.Exchange(m, ns)
}
if err != nil {
parts = append(parts, err.Error())
return r, &DNSError{Message: "DNS call error", MsgIn: m, NS: ns, Err: err}
}
if len(parts) > 0 {
return ": " + strings.Join(parts, " ")
}
return ""
return r, nil
}
// DNSError error related to DNS calls.
type DNSError struct {
Message string
NS string
MsgIn *dns.Msg
MsgOut *dns.Msg
Err error
}
func (d *DNSError) Error() string {
var details []string
if d.NS != "" {
details = append(details, "ns="+d.NS)
}
if d.MsgIn != nil && len(d.MsgIn.Question) > 0 {
details = append(details, fmt.Sprintf("question='%s'", formatQuestions(d.MsgIn.Question)))
}
if d.MsgOut != nil {
if d.MsgIn == nil || len(d.MsgIn.Question) == 0 {
details = append(details, fmt.Sprintf("question='%s'", formatQuestions(d.MsgOut.Question)))
}
details = append(details, "code="+dns.RcodeToString[d.MsgOut.Rcode])
}
msg := "DNS error"
if d.Message != "" {
msg = d.Message
}
if d.Err != nil {
msg += ": " + d.Err.Error()
}
if len(details) > 0 {
msg += " [" + strings.Join(details, ", ") + "]"
}
return msg
}
func (d *DNSError) Unwrap() error {
return d.Err
}
func formatQuestions(questions []dns.Question) string {
var parts []string
for _, question := range questions {
parts = append(parts, strings.ReplaceAll(strings.TrimPrefix(question.String(), ";"), "\t", " "))
}
return strings.Join(parts, ";")
}

View file

@ -1,9 +1,11 @@
package dns01
import (
"errors"
"sort"
"testing"
"github.com/miekg/dns"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
@ -52,7 +54,7 @@ func TestLookupNameserversErr(t *testing.T) {
{
desc: "invalid tld",
fqdn: "_null.n0n0.",
error: "could not determine the zone",
error: "could not find zone",
},
}
@ -109,7 +111,7 @@ var findXByFqdnTestCases = []struct {
fqdn: "test.lego.zz.",
zone: "lego.zz.",
nameservers: []string{"8.8.8.8:53"},
expectedError: "could not find the start of authority for test.lego.zz.: NXDOMAIN",
expectedError: "[fqdn=test.lego.zz.] could not find the start of authority for 'test.lego.zz.' [question='zz. IN SOA', code=NXDOMAIN]",
},
{
desc: "several non existent nameservers",
@ -119,18 +121,19 @@ var findXByFqdnTestCases = []struct {
nameservers: []string{":7053", ":8053", "8.8.8.8:53"},
},
{
desc: "only non-existent nameservers",
fqdn: "mail.google.com.",
zone: "google.com.",
nameservers: []string{":7053", ":8053", ":9053"},
expectedError: "could not find the start of authority for mail.google.com.: read udp",
desc: "only non-existent nameservers",
fqdn: "mail.google.com.",
zone: "google.com.",
nameservers: []string{":7053", ":8053", ":9053"},
// use only the start of the message because the port changes with each call: 127.0.0.1:XXXXX->127.0.0.1:7053.
expectedError: "[fqdn=mail.google.com.] could not find the start of authority for 'mail.google.com.': DNS call error: read udp ",
},
{
desc: "no nameservers",
fqdn: "test.ldez.com.",
zone: "ldez.com.",
nameservers: []string{},
expectedError: "could not find the start of authority for test.ldez.com.",
expectedError: "[fqdn=test.ldez.com.] could not find the start of authority for 'test.ldez.com.': empty list of nameservers",
},
}
@ -142,7 +145,7 @@ func TestFindZoneByFqdnCustom(t *testing.T) {
zone, err := FindZoneByFqdnCustom(test.fqdn, test.nameservers)
if test.expectedError != "" {
require.Error(t, err)
assert.Contains(t, err.Error(), test.expectedError)
assert.ErrorContains(t, err, test.expectedError)
} else {
require.NoError(t, err)
assert.Equal(t, test.zone, zone)
@ -159,7 +162,7 @@ func TestFindPrimaryNsByFqdnCustom(t *testing.T) {
ns, err := FindPrimaryNsByFqdnCustom(test.fqdn, test.nameservers)
if test.expectedError != "" {
require.Error(t, err)
assert.Contains(t, err.Error(), test.expectedError)
assert.ErrorContains(t, err, test.expectedError)
} else {
require.NoError(t, err)
assert.Equal(t, test.primaryNs, ns)
@ -197,3 +200,70 @@ func TestResolveConfServers(t *testing.T) {
})
}
}
func TestDNSError_Error(t *testing.T) {
msgIn := createDNSMsg("example.com.", dns.TypeTXT, true)
msgOut := createDNSMsg("example.org.", dns.TypeSOA, true)
msgOut.Rcode = dns.RcodeNameError
testCases := []struct {
desc string
err *DNSError
expected string
}{
{
desc: "empty error",
err: &DNSError{},
expected: "DNS error",
},
{
desc: "all fields",
err: &DNSError{
Message: "Oops",
NS: "example.com.",
MsgIn: msgIn,
MsgOut: msgOut,
Err: errors.New("I did it again"),
},
expected: "Oops: I did it again [ns=example.com., question='example.com. IN TXT', code=NXDOMAIN]",
},
{
desc: "only NS",
err: &DNSError{
NS: "example.com.",
},
expected: "DNS error [ns=example.com.]",
},
{
desc: "only MsgIn",
err: &DNSError{
MsgIn: msgIn,
},
expected: "DNS error [question='example.com. IN TXT']",
},
{
desc: "only MsgOut",
err: &DNSError{
MsgOut: msgOut,
},
expected: "DNS error [question='example.org. IN SOA', code=NXDOMAIN]",
},
{
desc: "only Err",
err: &DNSError{
Err: errors.New("I did it again"),
},
expected: "DNS error: I did it again",
},
}
for _, test := range testCases {
test := test
t.Run(test.desc, func(t *testing.T) {
t.Parallel()
assert.EqualError(t, test.err, test.expected)
})
}
}

View file

@ -198,7 +198,7 @@ func (d *DNSProvider) getHostedZone(domain string) (string, error) {
authZone, err := dns01.FindZoneByFqdn(domain)
if err != nil {
return "", fmt.Errorf("could not find zone for FQDN %q: %w", domain, err)
return "", fmt.Errorf("could not find zone: %w", err)
}
var hostedZone alidns.DomainInDescribeDomains

View file

@ -115,7 +115,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("allinkl: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("allinkl: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -111,7 +111,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("arvancloud: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("arvancloud: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)
@ -152,7 +152,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("arvancloud: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("arvancloud: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -108,7 +108,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("aurora: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("aurora: could not find zone for domain %q: %w", domain, err)
}
// 1. Aurora will happily create the TXT record when it is provided a fqdn,
@ -160,7 +160,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(dns01.ToFqdn(info.EffectiveFQDN))
if err != nil {
return fmt.Errorf("aurora: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("aurora: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -118,7 +118,7 @@ func (d *dnsProviderPrivate) getHostedZoneID(ctx context.Context, fqdn string) (
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", fmt.Errorf("could not find zone for FQDN %q: %w", fqdn, err)
return "", fmt.Errorf("could not find zone: %w", err)
}
dc := privatedns.NewPrivateZonesClientWithBaseURI(d.config.ResourceManagerEndpoint, d.config.SubscriptionID)

View file

@ -118,7 +118,7 @@ func (d *dnsProviderPublic) getHostedZoneID(ctx context.Context, fqdn string) (s
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", fmt.Errorf("could not find zone for FQDN %q: %w", fqdn, err)
return "", fmt.Errorf("could not find zone: %w", err)
}
dc := dns.NewZonesClientWithBaseURI(d.config.ResourceManagerEndpoint, d.config.SubscriptionID)

View file

@ -141,7 +141,7 @@ func (d *DNSProviderPrivate) getHostedZoneID(ctx context.Context, fqdn string) (
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", err
return "", fmt.Errorf("could not find zone: %w", err)
}
zone, err := d.zoneClient.Get(ctx, d.config.ResourceGroup, dns01.UnFqdn(authZone), nil)

View file

@ -141,7 +141,7 @@ func (d *DNSProviderPublic) getHostedZoneID(ctx context.Context, fqdn string) (s
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", err
return "", fmt.Errorf("could not find zone: %w", err)
}
zone, err := d.zoneClient.Get(ctx, d.config.ResourceGroup, dns01.UnFqdn(authZone), nil)

View file

@ -108,7 +108,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("brandit: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("brandit: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -155,7 +155,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("brandit: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("brandit: could not find zone for domain %q: %w", domain, err)
}
// gets the record's unique ID

View file

@ -94,7 +94,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := getZone(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("bunny: failed to find zone: fqdn=%s: %w", info.EffectiveFQDN, err)
return fmt.Errorf("bunny: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()
@ -129,7 +129,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := getZone(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("bunny: failed to find zone: fqdn=%s: %w", info.EffectiveFQDN, err)
return fmt.Errorf("bunny: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -95,7 +95,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("civo: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("civo: could not find zone for domain %q: %w", domain, err)
}
zone := dns01.UnFqdn(authZone)
@ -129,7 +129,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("civo: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("civo: could not find zone for domain %q: %w", domain, err)
}
zone := dns01.UnFqdn(authZone)

View file

@ -105,7 +105,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("clouddns: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("clouddns: could not find zone for domain %q: %w", domain, err)
}
ctx, err := d.client.CreateAuthenticatedContext(context.Background())
@ -127,7 +127,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("clouddns: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("clouddns: could not find zone for domain %q: %w", domain, err)
}
ctx, err := d.client.CreateAuthenticatedContext(context.Background())

View file

@ -126,7 +126,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("cloudflare: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("cloudflare: could not find zone for domain %q: %w", domain, err)
}
zoneID, err := d.client.ZoneIDByName(authZone)
@ -161,7 +161,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("cloudflare: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("cloudflare: could not find zone for domain %q: %w", domain, err)
}
zoneID, err := d.client.ZoneIDByName(authZone)

View file

@ -55,7 +55,7 @@ func NewClient(authID, subAuthID, authPassword string) (*Client, error) {
func (c *Client) GetZone(ctx context.Context, authFQDN string) (*Zone, error) {
authZone, err := dns01.FindZoneByFqdn(authFQDN)
if err != nil {
return nil, fmt.Errorf("could not find zone for FQDN %q: %w", authFQDN, err)
return nil, fmt.Errorf("could not find zone: %w", err)
}
authZoneName := dns01.UnFqdn(authZone)

View file

@ -109,7 +109,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("cloudru: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("cloudru: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -60,7 +60,7 @@ func (c *Client) GetDomainInformation(ctx context.Context, fqdn string) (*Data,
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return nil, fmt.Errorf("could not find zone for FQDN %q: %w", fqdn, err)
return nil, fmt.Errorf("could not find zone: %w", err)
}
var domains []Data

View file

@ -126,7 +126,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("conoha: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("conoha: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()
@ -157,7 +157,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("conoha: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("conoha: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -110,7 +110,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("constellix: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("constellix: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()
@ -153,7 +153,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("constellix: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("constellix: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -126,7 +126,7 @@ func (d *DNSProvider) Present(domain, _, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("arvancloud: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("arvancloud: could not find zone for domain %q: %w", domain, err)
}
zone := dns01.UnFqdn(authZone)
@ -200,7 +200,7 @@ func (d *DNSProvider) CleanUp(domain, _, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("arvancloud: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("arvancloud: could not find zone for domain %q: %w", domain, err)
}
zone := dns01.UnFqdn(authZone)

View file

@ -111,7 +111,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("derak: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("derak: could not find zone for domain %q: %w", domain, err)
}
recordName, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)

View file

@ -106,7 +106,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("desec: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("desec: could not find zone for domain %q: %w", domain, err)
}
recordName, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -156,7 +156,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("desec: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("desec: could not find zone for domain %q: %w", domain, err)
}
recordName, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)

View file

@ -129,7 +129,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("designate: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("designate: could not find zone for domain %q: %w", domain, err)
}
zoneID, err := d.getZoneID(authZone)
@ -169,7 +169,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("designate: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("designate: could not find zone for domain %q: %w", domain, err)
}
zoneID, err := d.getZoneID(authZone)

View file

@ -114,7 +114,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(dns01.ToFqdn(info.EffectiveFQDN))
if err != nil {
return fmt.Errorf("designate: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("digitalocean: could not find zone for domain %q: %w", domain, err)
}
record := internal.Record{Type: "TXT", Name: info.EffectiveFQDN, Data: info.Value, TTL: d.config.TTL}
@ -137,7 +137,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("designate: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("digitalocean: could not find zone for domain %q: %w", domain, err)
}
// get the record's unique ID from when we created it

View file

@ -120,7 +120,7 @@ func (d *DNSProvider) Present(domainName, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("dnsmadeeasy: could not find zone for domain %q (%s): %w", domainName, info.EffectiveFQDN, err)
return fmt.Errorf("dnsmadeeasy: could not find zone for domain %q: %w", domainName, err)
}
ctx := context.Background()
@ -148,7 +148,7 @@ func (d *DNSProvider) CleanUp(domainName, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("dnsmadeeasy: could not find zone for domain %q (%s): %w", domainName, info.EffectiveFQDN, err)
return fmt.Errorf("dnsmadeeasy: could not find zone for domain %q: %w", domainName, err)
}
ctx := context.Background()

View file

@ -143,7 +143,7 @@ func (d *DNSProvider) getHostedZone(domain string) (string, string, error) {
authZone, err := dns01.FindZoneByFqdn(domain)
if err != nil {
return "", "", fmt.Errorf("could not find zone for FQDN %q: %w", domain, err)
return "", "", fmt.Errorf("could not find zone: %w", err)
}
var hostedZone dnspod.Domain

View file

@ -143,7 +143,7 @@ func (d *DNSProvider) CleanUp(domain, _, keyAuth string) error {
func (d *DNSProvider) splitDomain(fqdn string) (string, string, error) {
zone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", "", fmt.Errorf("could not find zone for FQDN %q: %w", fqdn, err)
return "", "", fmt.Errorf("could not find zone: %w", err)
}
subDomain, err := dns01.ExtractSubDomain(fqdn, zone)

View file

@ -98,7 +98,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("dyn: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("dyn: could not find zone for domain %q: %w", domain, err)
}
ctx, err := d.client.CreateAuthenticatedContext(context.Background())
@ -125,7 +125,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("dyn: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("dyn: could not find zone for domain %q: %w", domain, err)
}
ctx, err := d.client.CreateAuthenticatedContext(context.Background())

View file

@ -99,7 +99,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
// find authZone
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("epik: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("epik: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -129,7 +129,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
// find authZone
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("epik: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("epik: could not find zone for domain %q: %w", domain, err)
}
dom := dns01.UnFqdn(authZone)

View file

@ -116,7 +116,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
zoneName, recordName, err := d.findZoneAndRecordName(info.EffectiveFQDN)
if err != nil {
return err
return fmt.Errorf("exoscale: %w", err)
}
zone, err := d.findExistingZone(zoneName)
@ -171,7 +171,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
zoneName, recordName, err := d.findZoneAndRecordName(info.EffectiveFQDN)
if err != nil {
return err
return fmt.Errorf("exoscale: %w", err)
}
zone, err := d.findExistingZone(zoneName)
@ -246,7 +246,7 @@ func (d *DNSProvider) findExistingRecordID(zoneID, recordName string) (string, e
func (d *DNSProvider) findZoneAndRecordName(fqdn string) (string, string, error) {
zone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", "", fmt.Errorf("designate: could not find zone for FQDN %q: %w", fqdn, err)
return "", "", fmt.Errorf("could not find zone: %w", err)
}
zone = dns01.UnFqdn(zone)

View file

@ -131,7 +131,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
// find authZone and Gandi zone_id for fqdn
authZone, err := d.findZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("gandi: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("gandi: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -134,7 +134,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
// find authZone
authZone, err := d.findZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("gandiv5: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("gandiv5: could not find zone for domain %q: %w", domain, err)
}
// determine name of TXT record

View file

@ -360,7 +360,7 @@ func (d *DNSProvider) lookupHostedZoneID(domain string) (string, []*dns.ManagedZ
authZone, err := dns01.FindZoneByFqdn(dns01.ToFqdn(domain))
if err != nil {
return "", nil, fmt.Errorf("could not find zone for FQDN %q: %w", domain, err)
return "", nil, fmt.Errorf("could not find zone: %w", err)
}
zones, err := d.client.ManagedZones.

View file

@ -110,7 +110,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
// find authZone
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("glesys: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("glesys: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)

View file

@ -107,7 +107,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("godaddy: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("godaddy: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)
@ -153,7 +153,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("godaddy: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("godaddy: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -89,7 +89,7 @@ type DNSProvider struct {
func (d *DNSProvider) Present(domain, token, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(dns01.ToFqdn(domain))
if err != nil {
return fmt.Errorf("googledomains: error finding zone for domain %s: %w", domain, err)
return fmt.Errorf("googledomains: could not find zone for domain %q: %w", domain, err)
}
rotateReq := acmedns.RotateChallengesRequest{
@ -109,7 +109,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(dns01.ToFqdn(domain))
if err != nil {
return fmt.Errorf("googledomains: error finding zone for domain %s: %w", domain, err)
return fmt.Errorf("googledomains: could not find zone for domain %q: %w", domain, err)
}
rotateReq := acmedns.RotateChallengesRequest{

View file

@ -103,7 +103,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("hetzner: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("hetzner: could not find zone for domain %q: %w", domain, err)
}
zone := dns01.UnFqdn(authZone)
@ -141,7 +141,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("hetzner: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("hetzner: could not find zone for domain %q: %w", domain, err)
}
zone := dns01.UnFqdn(authZone)

View file

@ -208,7 +208,7 @@ func (d *DNSProvider) getZoneName(fqdn string) (string, error) {
zoneName, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", fmt.Errorf("could not find zone for FQDN %q: %w", fqdn, err)
return "", fmt.Errorf("could not find zone: %w", err)
}
if zoneName == "" {

View file

@ -102,7 +102,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("hosttech: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("hosttech: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()
@ -142,7 +142,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("hosttech: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("hosttech: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -212,7 +212,7 @@ func (d *DNSProvider) getZoneName(fqdn string) (string, error) {
zoneName, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", fmt.Errorf("could not find zone for FQDN %q: %w", fqdn, err)
return "", fmt.Errorf("could not find zone: %w", err)
}
if zoneName == "" {

View file

@ -191,7 +191,7 @@ func (d *DNSProvider) CleanUp(domain, _, keyAuth string) error {
func (d *DNSProvider) getHostedZone(ctx context.Context, fqdn string) (*internal.Zone, error) {
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return nil, fmt.Errorf("hetzner: could not find zone for FQDN %q: %w", fqdn, err)
return nil, fmt.Errorf("could not find zone: %w", err)
}
return d.client.FindZone(ctx, authZone)

View file

@ -78,7 +78,7 @@ func (d *dmapiProvider) Present(domain, token, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("joker: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("joker: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, zone)
@ -116,7 +116,7 @@ func (d *dmapiProvider) CleanUp(domain, token, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("joker: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("joker: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, zone)

View file

@ -59,7 +59,7 @@ func (d *svcProvider) Present(domain, token, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("joker: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("joker: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, zone)
@ -76,7 +76,7 @@ func (d *svcProvider) CleanUp(domain, token, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("joker: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("joker: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, zone)

View file

@ -123,7 +123,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("liara: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("liara: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -155,7 +155,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("liara: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("liara: could not find zone for domain %q: %w", domain, err)
}
// gets the record's unique ID

View file

@ -177,7 +177,7 @@ func (d *DNSProvider) getHostedZoneInfo(fqdn string) (*hostedZoneInfo, error) {
// Lookup the zone that handles the specified FQDN.
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return nil, fmt.Errorf("inwx: could not find zone for FQDN %q: %w", fqdn, err)
return nil, fmt.Errorf("could not find zone: %w", err)
}
// Query the authority zone.

View file

@ -201,7 +201,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
func (d *DNSProvider) splitDomain(fqdn string) (string, string, error) {
authZone, err := d.findZoneByFqdn(fqdn)
if err != nil {
return "", "", fmt.Errorf("desec: could not find zone for FQDN %q: %w", fqdn, err)
return "", "", fmt.Errorf("could not find zone: %w", err)
}
subDomain, err := dns01.ExtractSubDomain(fqdn, authZone)

View file

@ -124,7 +124,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("luadns: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("luadns: could not find zone for domain %q: %w", domain, err)
}
zone := findZone(zones, dns01.UnFqdn(authZone))

View file

@ -92,7 +92,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("metaname: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("metaname: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)
@ -129,7 +129,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("metaname: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("metaname: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -123,7 +123,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("mythicbeasts: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("mythicbeasts: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -152,7 +152,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("mythicbeasts: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("mythicbeasts: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)

View file

@ -90,7 +90,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("namesilo: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("namesilo: could not find zone for domain %q: %w", domain, err)
}
zoneName := dns01.UnFqdn(zone)
@ -124,7 +124,7 @@ func (d *DNSProvider) CleanUp(domain, _, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("namesilo: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("namesilo: could not find zone for domain %q: %w", domain, err)
}
zoneName := dns01.UnFqdn(zone)

View file

@ -113,7 +113,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("nearlyfreespeech: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("nearlyfreespeech: could not find zone for domain %q: %w", domain, err)
}
recordName, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -142,7 +142,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("nearlyfreespeech: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("nearlyfreespeech: could not find zone for domain %q: %w", domain, err)
}
recordName, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)

View file

@ -97,7 +97,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("netcup: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("netcup: could not find zone for domain %q: %w", domain, err)
}
ctx, err := d.client.CreateSessionContext(context.Background())
@ -144,7 +144,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("netcup: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("netcup: could not find zone for domain %q: %w", domain, err)
}
ctx, err := d.client.CreateSessionContext(context.Background())

View file

@ -102,7 +102,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("netlify: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("netlify: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)
@ -132,7 +132,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("netlify: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("netlify: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -140,7 +140,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
rootDomain, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("nicmanager: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("nicmanager: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()
@ -173,7 +173,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
rootDomain, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("nicmanager: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("nicmanager: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -161,7 +161,7 @@ func (d *DNSProvider) changeRecord(action, fqdn, value string, ttl int) error {
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return fmt.Errorf("could not find zone for FQDN %q: %w", fqdn, err)
return fmt.Errorf("could not find zone: %w", err)
}
ctx := context.Background()

View file

@ -109,7 +109,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("nodion: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("nodion: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -160,7 +160,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("nodion: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("nodion: could not find zone for domain %q: %w", domain, err)
}
d.zoneIDsMu.Lock()

View file

@ -152,7 +152,7 @@ func (d *DNSProvider) Timeout() (timeout, interval time.Duration) {
func (d *DNSProvider) getHostedZone(fqdn string) (*dns.Zone, error) {
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return nil, fmt.Errorf("could not find zone for FQDN %q: %w", fqdn, err)
return nil, fmt.Errorf("could not find zone: %w", err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -107,7 +107,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
zoneNameOrID, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("oraclecloud: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("oraclecloud: could not find zone for domain %q: %w", domain, err)
}
// generate request to dns.PatchDomainRecordsRequest
@ -142,7 +142,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
zoneNameOrID, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("oraclecloud: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("oraclecloud: could not find zone for domain %q: %w", domain, err)
}
// search to TXT record's hash to delete

View file

@ -135,7 +135,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("otc: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("otc: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()
@ -172,7 +172,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("otc: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("otc: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -127,7 +127,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
// Parse domain name
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("ovh: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("ovh: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)
@ -175,7 +175,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("ovh: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("ovh: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -121,7 +121,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("pdns: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("pdns: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()
@ -183,7 +183,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("pdns: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("pdns: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -123,7 +123,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("plesk: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("plesk: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -171,7 +171,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
func splitDomain(fqdn string) (string, string, error) {
zone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", "", fmt.Errorf("could not find zone for FQDN %q: %w", fqdn, err)
return "", "", fmt.Errorf("could not find zone: %w", err)
}
subDomain, err := dns01.ExtractSubDomain(fqdn, zone)

View file

@ -80,7 +80,7 @@ func (c *Client) DeleteRecord(ctx context.Context, zoneID, recordID string) erro
func (c *Client) GetHostedZoneID(ctx context.Context, fqdn string) (string, error) {
authZone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", fmt.Errorf("could not find zone for FQDN %q: %w", fqdn, err)
return "", fmt.Errorf("could not find zone: %w", err)
}
zoneSearchResponse, err := c.listDomainsByName(ctx, dns01.UnFqdn(authZone))

View file

@ -100,7 +100,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("rcodezero: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("rcodezero: could not find zone for domain %q: %w", domain, err)
}
rrSet := []internal.UpdateRRSet{{
@ -127,7 +127,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("rcodezero: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("rcodezero: could not find zone for domain %q: %w", domain, err)
}
rrSet := []internal.UpdateRRSet{{

View file

@ -130,7 +130,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("regru: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("regru: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -153,7 +153,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("regru: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("regru: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)

View file

@ -105,7 +105,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
zone, err := dns01.FindZoneByFqdn(dns01.ToFqdn(info.EffectiveFQDN))
if err != nil {
return fmt.Errorf("safedns: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("safedns: could not find zone for domain %q: %w", domain, err)
}
record := internal.Record{
@ -133,7 +133,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("safedns: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("safedns: could not find zone for domain %q: %w", domain, err)
}
d.recordIDsMu.Lock()

View file

@ -82,7 +82,7 @@ func (d *DNSProvider) cleanupTXTRecord(fqdn, value string) error {
func (d *DNSProvider) getHostedZone(domain string) (*iaas.DNS, error) {
authZone, err := dns01.FindZoneByFqdn(domain)
if err != nil {
return nil, fmt.Errorf("could not find zone for FQDN %q: %w", domain, err)
return nil, fmt.Errorf("could not find zone: %w", err)
}
zoneName := dns01.UnFqdn(authZone)

View file

@ -214,7 +214,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
func getAuthZone(domain string) (string, error) {
authZone, err := dns01.FindZoneByFqdn(domain)
if err != nil {
return "", fmt.Errorf("could not find zone for FQDN %q: %w", domain, err)
return "", fmt.Errorf("could not find zone: %w", err)
}
zoneName := dns01.UnFqdn(authZone)

View file

@ -115,7 +115,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("simply: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("simply: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)
@ -150,7 +150,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("simply: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("simply: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -33,7 +33,7 @@ func (d *DNSProvider) getHostedZone(domain string) (*dnspod.DomainListItem, erro
authZone, err := dns01.FindZoneByFqdn(domain)
if err != nil {
return nil, fmt.Errorf("could not find zone for FQDN %q : %w", domain, err)
return nil, fmt.Errorf("could not find zone: %w", err)
}
var hostedZone *dnspod.DomainListItem

View file

@ -95,7 +95,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("transip: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("transip: could not find zone for domain %q: %w", domain, err)
}
// get the subDomain
@ -127,7 +127,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("transip: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("transip: could not find zone for domain %q: %w", domain, err)
}
// get the subDomain

View file

@ -105,7 +105,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("ultradns: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("ultradns: could not find zone for domain %q: %w", domain, err)
}
recordService, err := record.Get(d.client)
@ -146,7 +146,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("ultradns: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("ultradns: could not find zone for domain %q: %w", domain, err)
}
recordService, err := record.Get(d.client)

View file

@ -113,7 +113,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("variomedia: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("variomedia: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)

View file

@ -104,7 +104,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("vercel: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("vercel: could not find zone for domain %q: %w", domain, err)
}
record := internal.Record{
@ -132,7 +132,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("vercel: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("vercel: could not find zone for domain %q: %w", domain, err)
}
// get the record's unique ID from when we created it

View file

@ -120,7 +120,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("versio: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("versio: could not find zone for domain %q: %w", domain, err)
}
// use mutex to prevent race condition from getDNSRecords until postDNSRecords
@ -161,7 +161,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("versio: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("versio: could not find zone for domain %q: %w", domain, err)
}
// use mutex to prevent race condition from getDNSRecords until postDNSRecords

View file

@ -116,7 +116,7 @@ func (d *DNSProvider) waitForChanges(operation string, resp *vinyldns.RecordSetU
func splitDomain(fqdn string) (string, string, error) {
zone, err := dns01.FindZoneByFqdn(fqdn)
if err != nil {
return "", "", fmt.Errorf("could not find zone for FDQN %q: %w", fqdn, err)
return "", "", fmt.Errorf("could not find zone: %w", err)
}
subDomain, err := dns01.ExtractSubDomain(fqdn, zone)

View file

@ -121,7 +121,7 @@ func (r *DNSProvider) Present(domain, _, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("vkcloud: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("vkcloud: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)
@ -161,7 +161,7 @@ func (r *DNSProvider) CleanUp(domain, _, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("vkcloud: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("vkcloud: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -89,7 +89,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("webnames: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("webnames: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -112,7 +112,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("webnames: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("webnames: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)

View file

@ -105,7 +105,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("websupport: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("websupport: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -142,7 +142,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("websupport: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("websupport: could not find zone for domain %q: %w", domain, err)
}
// gets the record's unique ID

View file

@ -108,7 +108,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("wedos: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("wedos: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -156,7 +156,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("wedos: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("wedos: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)

View file

@ -107,7 +107,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(dns01.ToFqdn(info.EffectiveFQDN))
if err != nil {
return fmt.Errorf("yandex360: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("yandex360: could not find zone for domain %q: %w", domain, err)
}
subDomain, err := dns01.ExtractSubDomain(info.EffectiveFQDN, authZone)
@ -142,7 +142,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(dns01.ToFqdn(info.EffectiveFQDN))
if err != nil {
return fmt.Errorf("yandex360: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("yandex360: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)

View file

@ -105,7 +105,7 @@ func (r *DNSProvider) Present(domain, _, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("yandexcloud: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("yandexcloud: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()
@ -146,7 +146,7 @@ func (r *DNSProvider) CleanUp(domain, _, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("yandexcloud: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("yandexcloud: could not find zone for domain %q: %w", domain, err)
}
ctx := context.Background()

View file

@ -126,7 +126,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("zoneee: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("zoneee: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)
@ -144,7 +144,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error {
authZone, err := dns01.FindZoneByFqdn(info.EffectiveFQDN)
if err != nil {
return fmt.Errorf("zoneee: could not find zone for domain %q (%s): %w", domain, info.EffectiveFQDN, err)
return fmt.Errorf("zoneee: could not find zone for domain %q: %w", domain, err)
}
authZone = dns01.UnFqdn(authZone)