mirror of
https://github.com/goharbor/harbor
synced 2025-04-21 06:46:24 +00:00
fix bug
This commit is contained in:
parent
72b3a020e3
commit
771e26a188
@ -57,7 +57,7 @@ func (c *Client) send(req *http.Request, expectedStatus int) ([]byte, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if resp.StatusCode != http.StatusOK {
|
||||
if resp.StatusCode != expectedStatus {
|
||||
return nil, fmt.Errorf("Unexpected status code: %d, text: %s", resp.StatusCode, string(b))
|
||||
}
|
||||
return b, nil
|
||||
|
Loading…
x
Reference in New Issue
Block a user