mirror of
https://github.com/genuinetools/reg.git
synced 2024-09-28 11:46:20 -04:00
fix delete
Signed-off-by: Jess Frazelle <me@jessfraz.com>
This commit is contained in:
parent
5bb5c33bdf
commit
162757c7b7
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue