summaryrefslogtreecommitdiff
path: root/pkg/domain/infra/abi
diff options
context:
space:
mode:
authorValentin Rothberg <rothberg@redhat.com>2020-06-05 14:57:11 +0200
committerValentin Rothberg <rothberg@redhat.com>2020-06-11 11:01:13 +0200
commit9232d4e44365e0fa344fc5432dfd4843cb4c200c (patch)
tree6132181e6e6ebcc105c8c23ef94349183c9ce7c0 /pkg/domain/infra/abi
parent402c68b41d3fd8f354a4fd0ba4d4101920f8cfe6 (diff)
downloadpodman-9232d4e44365e0fa344fc5432dfd4843cb4c200c.tar.gz
podman-9232d4e44365e0fa344fc5432dfd4843cb4c200c.tar.bz2
podman-9232d4e44365e0fa344fc5432dfd4843cb4c200c.zip
generate systemd: rephrase lookup error
Rephrase the lookup error when the specified name or ID does not refer to a container or pod. Until, only the pod-lookup error has been returned which can be confusing when actually looking for a container; a user might have just mistyped the ID or name. Signed-off-by: Valentin Rothberg <rothberg@redhat.com>
Diffstat (limited to 'pkg/domain/infra/abi')
-rw-r--r--pkg/domain/infra/abi/generate.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/domain/infra/abi/generate.go b/pkg/domain/infra/abi/generate.go
index abb5e2911..08cb87287 100644
--- a/pkg/domain/infra/abi/generate.go
+++ b/pkg/domain/infra/abi/generate.go
@@ -40,7 +40,7 @@ func (ic *ContainerEngine) GenerateSystemd(ctx context.Context, nameOrID string,
// We're either having a pod or garbage.
pod, err := ic.Libpod.LookupPod(nameOrID)
if err != nil {
- return nil, err
+ return nil, errors.Errorf("%q does not refer to a container or pod", nameOrID)
}
// Error out if the pod has no infra container, which we require to be the