summaryrefslogtreecommitdiff
path: root/pkg/api/handlers/utils/errors.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-05-05 09:20:16 -0400
committerGitHub <noreply@github.com>2021-05-05 09:20:16 -0400
commita278195af3423f882c1f5bb218792f7c2ce10a3c (patch)
tree192e52054de2abf0c92d83ecdbc71d498c2ec947 /pkg/api/handlers/utils/errors.go
parent8eefca5a257121b177562742c972e39e1686140d (diff)
parent0f7d54b0260c1be992ee3b9cee359ef3a9e8bd21 (diff)
downloadpodman-a278195af3423f882c1f5bb218792f7c2ce10a3c.tar.gz
podman-a278195af3423f882c1f5bb218792f7c2ce10a3c.tar.bz2
podman-a278195af3423f882c1f5bb218792f7c2ce10a3c.zip
Merge pull request #10147 from vrothberg/new-image-package
migrate Podman to containers/common/libimage
Diffstat (limited to 'pkg/api/handlers/utils/errors.go')
-rw-r--r--pkg/api/handlers/utils/errors.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/pkg/api/handlers/utils/errors.go b/pkg/api/handlers/utils/errors.go
index d22ad414f..4a8005bfd 100644
--- a/pkg/api/handlers/utils/errors.go
+++ b/pkg/api/handlers/utils/errors.go
@@ -6,6 +6,7 @@ import (
"github.com/containers/podman/v3/libpod/define"
"github.com/containers/podman/v3/pkg/errorhandling"
+ "github.com/containers/storage"
"github.com/pkg/errors"
log "github.com/sirupsen/logrus"
)
@@ -49,7 +50,7 @@ func ContainerNotFound(w http.ResponseWriter, name string, err error) {
}
func ImageNotFound(w http.ResponseWriter, name string, err error) {
- if errors.Cause(err) != define.ErrNoSuchImage {
+ if errors.Cause(err) != storage.ErrImageUnknown {
InternalServerError(w, err)
}
msg := fmt.Sprintf("No such image: %s", name)