private static async Task <IPAddress[]> GetHostAddressesAsync(string hostName)
    {
        Exception?exception = null;

        try
        {
            var ipAddresses = await Dns.GetHostAddressesAsync(hostName).ConfigureAwait(false);

            if (ipAddresses.Length > 0)
            {
                return(ipAddresses);
            }
        }
        catch (Exception ex)
        {
            exception = ex;
        }

        var status = KuduStatus.IOError($"Unable to resolve address for {hostName}");

        throw new NonRecoverableException(status, exception);
    }