handle path not found when to delete manifest

Return not found error if gets the driver PathNotFound.

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
wang yan 2020-07-23 01:31:52 +08:00
parent 2041fd337b
commit 53fb5c4230

View File

@ -54,7 +54,7 @@ func (h *handler) delete(w http.ResponseWriter, r *http.Request) {
cleaner := storage.NewVacuum(r.Context(), h.storageDriver)
if err := cleaner.RemoveManifest(repoName, dgst, tags); err != nil {
log.Infof("failed to remove manifest: %s, with error:%v", ref, err)
api.HandleInternalServerError(w, err)
api.HandleError(w, err)
return
}
}