diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-03-20 22:22:20 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-20 22:22:20 +0100 |
commit | 7a095af92a6a39845b1c362222b23632f3e17001 (patch) | |
tree | 52a8692894690a8f09e025f90d6d2b5045259e4f /pkg/api/handlers/libpod | |
parent | 6df1d2043bd3cd2252ea3d737cf542e332106074 (diff) | |
parent | c81e065149da73ae904aa19ee46a23d1ab8ce55c (diff) | |
download | podman-7a095af92a6a39845b1c362222b23632f3e17001.tar.gz podman-7a095af92a6a39845b1c362222b23632f3e17001.tar.bz2 podman-7a095af92a6a39845b1c362222b23632f3e17001.zip |
Merge pull request #5571 from baude/v2exists
podmanv2 container exists|wait
Diffstat (limited to 'pkg/api/handlers/libpod')
-rw-r--r-- | pkg/api/handlers/libpod/containers.go | 6 |
1 files changed, 5 insertions, 1 deletions
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, "") } |