fix delete

Signed-off-by: Jess Frazelle <me@jessfraz.com>
This commit is contained in:
Jess Frazelle 2016-09-20 18:49:25 -07:00
parent 5bb5c33bdf
commit 162757c7b7
No known key found for this signature in database
GPG key ID: 18F3685C0022BFF3
2 changed files with 2 additions and 2 deletions

View file

@ -21,7 +21,7 @@ func (r *Registry) Delete(repository, ref string) error {
}
defer resp.Body.Close()
if resp.StatusCode == http.StatusAccepted {
if resp.StatusCode == http.StatusAccepted || resp.StatusCode == http.StatusNotFound {
return nil
}

View file

@ -29,7 +29,7 @@ func (t *ErrorTransport) RoundTrip(request *http.Request) (*http.Response, error
return resp, err
}
if resp.StatusCode >= 400 {
if resp.StatusCode >= 500 {
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
if err != nil {