mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Merge pull request #166 from brendandburns/sync
Part #1 of synchronous requests: Add channels and a mechanism for waiting
This commit is contained in:
@@ -95,7 +95,7 @@ func (client Client) rawRequest(method, path string, requestBody io.Reader, targ
|
||||
if err != nil {
|
||||
return body, err
|
||||
}
|
||||
if response.StatusCode != 200 {
|
||||
if response.StatusCode < http.StatusOK || response.StatusCode > http.StatusPartialContent {
|
||||
return nil, fmt.Errorf("request [%s %s] failed (%d) %s: %s", method, client.makeURL(path), response.StatusCode, response.Status, string(body))
|
||||
}
|
||||
if target != nil {
|
||||
|
||||
Reference in New Issue
Block a user