summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/libpod/containers.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-02-01 08:47:54 -0500
committerGitHub <noreply@github.com>2021-02-01 08:47:54 -0500
commit81a3ba36ae8d22b767e620c0b4c804764340de52 (patch)
tree55e0c5eb89271652000572e3fc781d7582b3e42a /pkg/api/handlers/libpod/containers.go
parentb045c173756dddcedf6a99a70f520bf423072826 (diff)
parent073f76c1327d296360caa04ef7d751dd00ef5a53 (diff)
downloadpodman-81a3ba36ae8d22b767e620c0b4c804764340de52.tar.gz
podman-81a3ba36ae8d22b767e620c0b4c804764340de52.tar.bz2
podman-81a3ba36ae8d22b767e620c0b4c804764340de52.zip
Merge pull request #9051 from rhatdan/rm
Switch podman stop/kill/wait handlers to use abi
Diffstat (limited to 'pkg/api/handlers/libpod/containers.go')
-rw-r--r--pkg/api/handlers/libpod/containers.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/api/handlers/libpod/containers.go b/pkg/api/handlers/libpod/containers.go
index a0cb1d49e..f6e348cef 100644
--- a/pkg/api/handlers/libpod/containers.go
+++ b/pkg/api/handlers/libpod/containers.go
@@ -148,6 +148,12 @@ func GetContainer(w http.ResponseWriter, r *http.Request) {
func WaitContainer(w http.ResponseWriter, r *http.Request) {
exitCode, err := utils.WaitContainer(w, r)
if err != nil {
+ name := utils.GetName(r)
+ if errors.Cause(err) == define.ErrNoSuchCtr {
+ utils.ContainerNotFound(w, name, err)
+ return
+ }
+ logrus.Warnf("failed to wait on container %q: %v", name, err)
return
}
utils.WriteResponse(w, http.StatusOK, strconv.Itoa(int(exitCode)))