apply feedback
Signed-off-by: João Pereira <484633+joaodrp@users.noreply.github.com>
This commit is contained in:
parent
81f081f91b
commit
033683d629
@ -492,13 +492,14 @@ func (imh *manifestHandler) DeleteManifest(w http.ResponseWriter, r *http.Reques
|
|||||||
}
|
}
|
||||||
|
|
||||||
if imh.Tag != "" {
|
if imh.Tag != "" {
|
||||||
|
dcontext.GetLogger(imh).Debug("DeleteImageTag")
|
||||||
tagService := imh.Repository.Tags(imh.Context)
|
tagService := imh.Repository.Tags(imh.Context)
|
||||||
if err := tagService.Untag(imh.Context, imh.Tag); err != nil {
|
if err := tagService.Untag(imh.Context, imh.Tag); err != nil {
|
||||||
switch err.(type) {
|
switch err.(type) {
|
||||||
case distribution.ErrTagUnknown, driver.PathNotFoundError:
|
case distribution.ErrTagUnknown, driver.PathNotFoundError:
|
||||||
imh.Errors = append(imh.Errors, v2.ErrorCodeManifestUnknown)
|
imh.Errors = append(imh.Errors, v2.ErrorCodeManifestUnknown.WithDetail(err))
|
||||||
default:
|
default:
|
||||||
imh.Errors = append(imh.Errors, errcode.ErrorCodeUnknown)
|
imh.Errors = append(imh.Errors, errcode.ErrorCodeUnknown.WithDetail(err))
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user