From 8a7fb25edc599f64796307b868404ffa7596cdc0 Mon Sep 17 00:00:00 2001 From: Ludovic Fernandez Date: Sat, 27 May 2023 12:19:14 +0200 Subject: [PATCH] websupport: simplify errors (#1924) --- providers/dns/websupport/websupport.go | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/providers/dns/websupport/websupport.go b/providers/dns/websupport/websupport.go index a8b74010..f727db16 100644 --- a/providers/dns/websupport/websupport.go +++ b/providers/dns/websupport/websupport.go @@ -133,12 +133,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error { return nil } - err = internal.ParseError(resp) - if err != nil { - return fmt.Errorf("websupport: %w", err) - } - - return nil + return fmt.Errorf("websupport: %w", internal.ParseError(resp)) } // CleanUp removes the TXT record matching the specified parameters. @@ -172,12 +167,7 @@ func (d *DNSProvider) CleanUp(domain, token, keyAuth string) error { return nil } - err = internal.ParseError(resp) - if err != nil { - return fmt.Errorf("websupport: %w", err) - } - - return nil + return fmt.Errorf("websupport: %w", internal.ParseError(resp)) } // Timeout returns the timeout and interval to use when checking for DNS propagation.