summaryrefslogtreecommitdiff
path: root/pkg
diff options
context:
space:
mode:
authorbaude <bbaude@redhat.com>2018-08-27 12:28:25 -0500
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-28 10:11:21 +0000
commitbfedcb4f3c2da84dd51dc886ed8ffc303daf88f7 (patch)
tree51a9ab883d60cd4528c8382cbd67bb18b9188c3e /pkg
parent9edea231f114cb6835d2efb436b010df30c40875 (diff)
downloadpodman-bfedcb4f3c2da84dd51dc886ed8ffc303daf88f7.tar.gz
podman-bfedcb4f3c2da84dd51dc886ed8ffc303daf88f7.tar.bz2
podman-bfedcb4f3c2da84dd51dc886ed8ffc303daf88f7.zip
Ensure return errors match API docs
In the API docs, we generally state the type of error that should be returned if a container or image cannot be found. In several cases, the code did not match the API doc, when the API doc was correct. Signed-off-by: baude <bbaude@redhat.com> Closes: #1353 Approved by: rhatdan
Diffstat (limited to 'pkg')
-rw-r--r--pkg/varlinkapi/images.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index 7953c1fc6..174225953 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -58,7 +58,7 @@ func (i *LibpodAPI) ListImages(call iopodman.VarlinkCall) error {
func (i *LibpodAPI) GetImage(call iopodman.VarlinkCall, name string) error {
newImage, err := i.Runtime.ImageRuntime().NewFromLocal(name)
if err != nil {
- return call.ReplyErrorOccurred(err.Error())
+ return call.ReplyImageNotFound(err.Error())
}
labels, err := newImage.Labels(getContext())
if err != nil {