summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi/containers.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/varlinkapi/containers.go')
-rw-r--r--pkg/varlinkapi/containers.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/varlinkapi/containers.go b/pkg/varlinkapi/containers.go
index 58452716a..f517e9b6e 100644
--- a/pkg/varlinkapi/containers.go
+++ b/pkg/varlinkapi/containers.go
@@ -207,6 +207,9 @@ func (i *LibpodAPI) GetContainerStats(call iopodman.VarlinkCall, name string) er
}
containerStats, err := ctr.GetContainerStats(&libpod.ContainerStats{})
if err != nil {
+ if errors.Cause(err) == libpod.ErrCtrStateInvalid {
+ return call.ReplyNoContainerRunning()
+ }
return call.ReplyErrorOccurred(err.Error())
}
cs := iopodman.ContainerStats{