diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-02-12 09:19:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-12 09:19:44 +0100 |
commit | d0452ae6f3e3bd664ad45ef13ed5da1a8c09006b (patch) | |
tree | e4d93ab864b444a48cf1ba273efddddb6a2a547f /pkg/api/handlers/libpod/pods.go | |
parent | 4bdfeed5bf9c467c8ab53b392747ec722505b179 (diff) | |
parent | ba30bb8409c20f370dfc3c5ad1351e62a523706d (diff) | |
download | podman-d0452ae6f3e3bd664ad45ef13ed5da1a8c09006b.tar.gz podman-d0452ae6f3e3bd664ad45ef13ed5da1a8c09006b.tar.bz2 podman-d0452ae6f3e3bd664ad45ef13ed5da1a8c09006b.zip |
Merge pull request #5176 from edsantiago/304_is_not_an_error
HTTP 304 (NotModified) is not an error!
Diffstat (limited to 'pkg/api/handlers/libpod/pods.go')
-rw-r--r-- | pkg/api/handlers/libpod/pods.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/pkg/api/handlers/libpod/pods.go b/pkg/api/handlers/libpod/pods.go index 8fb305290..e9297d91b 100644 --- a/pkg/api/handlers/libpod/pods.go +++ b/pkg/api/handlers/libpod/pods.go @@ -202,8 +202,7 @@ func PodStop(w http.ResponseWriter, r *http.Request) { } } if allContainersStopped { - alreadyStopped := errors.Errorf("pod %s is already stopped", pod.ID()) - utils.Error(w, "Something went wrong", http.StatusNotModified, alreadyStopped) + utils.WriteResponse(w, http.StatusNotModified, "") return } @@ -249,8 +248,7 @@ func PodStart(w http.ResponseWriter, r *http.Request) { } } if allContainersRunning { - alreadyRunning := errors.Errorf("pod %s is already running", pod.ID()) - utils.Error(w, "Something went wrong", http.StatusNotModified, alreadyRunning) + utils.WriteResponse(w, http.StatusNotModified, "") return } if _, err := pod.Start(r.Context()); err != nil { |