mirror of
https://github.com/containers/podman.git
synced 2026-10-24 10:49:10 -04:00
Merge pull request #6297 from mheon/minor_fix_attach
Print container state when erroring that it is improper
This commit is contained in:
1 file changed
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user