Skip to content

Commit

Permalink
websupport: simplify errors (#1924)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed May 27, 2023
1 parent 8d8a3c1 commit 8a7fb25
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions providers/dns/websupport/websupport.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 8a7fb25

Please sign in to comment.