diff --git a/pkg/api-client/api-client.go b/pkg/api-client/api-client.go index 47f1ef05..dd8549e5 100644 --- a/pkg/api-client/api-client.go +++ b/pkg/api-client/api-client.go @@ -140,7 +140,7 @@ func (c *ApiClientImpl) callWithBody(prefix string, method string, path string, res.Body.Close() }() - if res.StatusCode != 200 { + if res.StatusCode%100 != 2 { var restError httpErrors.RestError if err := json.Unmarshal(body, &restError); err != nil { return nil, fmt.Errorf("Invalid http status. failed to unmarshal body : %s", err)