From 53fb5c42307cd2671ac291d0763c463ce2213256 Mon Sep 17 00:00:00 2001 From: wang yan Date: Thu, 23 Jul 2020 01:31:52 +0800 Subject: [PATCH] handle path not found when to delete manifest Return not found error if gets the driver PathNotFound. Signed-off-by: wang yan --- src/registryctl/api/registry/manifest/manifest.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/registryctl/api/registry/manifest/manifest.go b/src/registryctl/api/registry/manifest/manifest.go index 44347dee0..e5a8408a8 100644 --- a/src/registryctl/api/registry/manifest/manifest.go +++ b/src/registryctl/api/registry/manifest/manifest.go @@ -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 } }