fix: nil pointer on error handling. (#1291)
This commit is contained in:
parent
b04d00b8fe
commit
3158518511
1 changed files with 1 additions and 1 deletions
|
@ -183,7 +183,7 @@ func (d *DNSProvider) Present(domain, token, keyAuth string) error {
|
||||||
rset, err := rsc.Get(ctx, d.config.ResourceGroup, zone, relative, dns.TXT)
|
rset, err := rsc.Get(ctx, d.config.ResourceGroup, zone, relative, dns.TXT)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
var detailed *autorest.DetailedError
|
var detailed *autorest.DetailedError
|
||||||
if !errors.As(err, detailed) || detailed.StatusCode != http.StatusNotFound {
|
if !errors.As(err, &detailed) || detailed.StatusCode != http.StatusNotFound {
|
||||||
return fmt.Errorf("azure: %w", err)
|
return fmt.Errorf("azure: %w", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue