mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 20:24:09 +00:00
Merge pull request #94078 from DataDog/armclient-errors-handling
ARM client: survive empty response and error
This commit is contained in:
commit
e7420a483f
@ -110,6 +110,11 @@ func (c *Client) sendRequest(ctx context.Context, request *http.Request) (*http.
|
|||||||
request,
|
request,
|
||||||
retry.DoExponentialBackoffRetry(&sendBackoff),
|
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)
|
return response, retry.GetError(response, err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user