mirror of https://github.com/containers/podman.git
Merge pull request #6297 from mheon/minor_fix_attach
Print container state when erroring that it is improper
This commit is contained in:
commit
6a75dfa8a8
|
@ -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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue