mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +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,
|
||||
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)
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user