diff --git a/staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/azure_armclient.go b/staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/azure_armclient.go index 70d81d87bb8..9c7694a51cc 100644 --- a/staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/azure_armclient.go +++ b/staging/src/k8s.io/legacy-cloud-providers/azure/clients/armclient/azure_armclient.go @@ -110,6 +110,11 @@ func (c *Client) sendRequest(ctx context.Context, request *http.Request) (*http. request, retry.DoExponentialBackoffRetry(&sendBackoff), ) + + if response == nil && err == nil { + return response, retry.NewError(false, fmt.Errorf("Empty response and no HTTP code")) + } + return response, retry.GetError(response, err) }