From 02ba02167ae6abd47076d261b63e0dc3b99d89ef Mon Sep 17 00:00:00 2001 From: Maartje Eyskens Date: Thu, 16 Jul 2020 10:13:57 +0200 Subject: [PATCH] Improve error output for Cloudflare Signed-off-by: Maartje Eyskens --- pkg/issuer/acme/dns/cloudflare/cloudflare.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/issuer/acme/dns/cloudflare/cloudflare.go b/pkg/issuer/acme/dns/cloudflare/cloudflare.go index 86fe218d0..734f9f8ae 100644 --- a/pkg/issuer/acme/dns/cloudflare/cloudflare.go +++ b/pkg/issuer/acme/dns/cloudflare/cloudflare.go @@ -236,7 +236,7 @@ func (c *DNSProvider) makeRequest(method, uri string, body io.Reader) (json.RawM } resp, err := client.Do(req) if err != nil { - return nil, fmt.Errorf("Error querying Cloudflare API -> %v", err) + return nil, fmt.Errorf("Error querying Cloudflare API for %s %q -> %v", method, uri, err) } defer resp.Body.Close() @@ -256,9 +256,9 @@ func (c *DNSProvider) makeRequest(method, uri string, body io.Reader) (json.RawM errStr += fmt.Sprintf("<- %d: %s", chainErr.Code, chainErr.Message) } } - return nil, fmt.Errorf("Cloudflare API Error \n%s", errStr) + return nil, fmt.Errorf("Cloudflare API Error for %s %q \n%s", method, uri, errStr) } - return nil, fmt.Errorf("Cloudflare API error") + return nil, fmt.Errorf("Cloudflare API error for %s %q", method, uri) } return r.Result, nil