summaryrefslogtreecommitdiff
path: root/libpod/container_api.go
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@redhat.com>2022-07-22 13:49:49 +0200
committerMatthew Heon <matthew.heon@pm.me>2022-07-26 14:40:52 -0400
commit772e883f83a46bc113c1ed26aea29bf5dcf5675a (patch)
tree2e6598594268620310d399c6d2d5e36bcd912827 /libpod/container_api.go
parent206f11d4fbda23c2dbae8c15014f01809b9bdd68 (diff)
downloadpodman-772e883f83a46bc113c1ed26aea29bf5dcf5675a.tar.gz
podman-772e883f83a46bc113c1ed26aea29bf5dcf5675a.tar.bz2
podman-772e883f83a46bc113c1ed26aea29bf5dcf5675a.zip
container wait: improve error message
Improve the error message when looking up the exit code of a container. The state of the container may help us track down #14859 which flakes rarely and is impossible to reproduce on my machine. [NO NEW TESTS NEEDED] Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
Diffstat (limited to 'libpod/container_api.go')
-rw-r--r--libpod/container_api.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/libpod/container_api.go b/libpod/container_api.go
index 742eb6d3e..2ff4bfe08 100644
--- a/libpod/container_api.go
+++ b/libpod/container_api.go
@@ -555,7 +555,7 @@ func (c *Container) WaitForExit(ctx context.Context, pollInterval time.Duration)
// The container never ran.
return true, 0, nil
}
- return true, -1, err
+ return true, -1, fmt.Errorf("%w (container in state %s)", err, c.state.State)
}
return true, exitCode, nil