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 c595e9d068a..0854c8e8fcf 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 @@ -109,6 +109,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) }