use errors.AsV2()

This commit is contained in:
kim 2024-04-04 11:02:16 +01:00
parent 3c9451b327
commit 175c8700d1

View file

@ -291,8 +291,8 @@ func (c *Client) do(r *request) (*http.Response, bool /* retry */, error) {
return nil, false, err
}
if dnserr := (*net.DNSError)(nil); // nocollapse
errors.As(err, &dnserr) && dnserr.IsNotFound {
if dnserr := errorsv2.AsV2[*net.DNSError](err); // nocollapse
dnserr != nil && dnserr.IsNotFound {
// DNS lookup failure, this domain does not exist
return nil, false, gtserror.SetNotFound(err)
}