From 87293028e61d0c88c258ed9f4a82c4be7f0bc896 Mon Sep 17 00:00:00 2001 From: Brent Baude Date: Thu, 19 Mar 2020 16:50:15 -0500 Subject: podmanv2 container exists|wait enable container exists and wait for podmanv2 Signed-off-by: Brent Baude --- pkg/api/handlers/libpod/containers.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'pkg/api/handlers/libpod') diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go index 8020c391d..cdc34004f 100644 --- a/pkg/api/handlers/libpod/containers.go +++ b/pkg/api/handlers/libpod/containers.go @@ -21,8 +21,12 @@ func ContainerExists(w http.ResponseWriter, r *http.Request) { name := utils.GetName(r) _, err := runtime.LookupContainer(name) if err != nil { - utils.ContainerNotFound(w, name, err) + if errors.Cause(err) == define.ErrNoSuchCtr { + utils.ContainerNotFound(w, name, err) + } + utils.InternalServerError(w, err) return + } utils.WriteResponse(w, http.StatusNoContent, "") } -- cgit v1.2.3-54-g00ecf