diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-05-20 21:46:55 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-20 21:46:55 +0200 |
commit | 6a75dfa8a85d7b9677f545aba976dbe82404cf3d (patch) | |
tree | e6cf3e07b3efbd27027f0a1df117ce48652ea011 | |
parent | aeba6dbcac1b91aa1967b2f8dd2134a5ba64c185 (diff) | |
parent | 07d82d111af221334f799497d0946a0af943c8bb (diff) | |
download | podman-6a75dfa8a85d7b9677f545aba976dbe82404cf3d.tar.gz podman-6a75dfa8a85d7b9677f545aba976dbe82404cf3d.tar.bz2 podman-6a75dfa8a85d7b9677f545aba976dbe82404cf3d.zip |
Merge pull request #6297 from mheon/minor_fix_attach
Print container state when erroring that it is improper
-rw-r--r-- | pkg/api/handlers/compat/containers_attach.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/api/handlers/compat/containers_attach.go b/pkg/api/handlers/compat/containers_attach.go index 5fc3117b9..012e20daf 100644 --- a/pkg/api/handlers/compat/containers_attach.go +++ b/pkg/api/handlers/compat/containers_attach.go @@ -94,7 +94,7 @@ func AttachContainer(w http.ResponseWriter, r *http.Request) { return } } else if !(state == define.ContainerStateCreated || state == define.ContainerStateRunning) { - utils.InternalServerError(w, errors.Wrapf(define.ErrCtrStateInvalid, "can only attach to created or running containers")) + utils.InternalServerError(w, errors.Wrapf(define.ErrCtrStateInvalid, "can only attach to created or running containers - currently in state %s", state.String())) return } |