aboutsummaryrefslogtreecommitdiff
path: root/libpod
diff options
context:
space:
mode:
authorzhangguanzhang <zhangguanzhang@qq.com>2020-08-02 21:08:13 +0800
committerValentin Rothberg <rothberg@redhat.com>2020-08-11 13:53:23 +0200
commit8931e99a18cc168ebee07bb72b62849815af7434 (patch)
tree9ed8bf6344ae3c6e3d629f94b868997c34398bb3 /libpod
parentc24c64e89e8a32b4fa24385aa540ee00f5d0c991 (diff)
downloadpodman-8931e99a18cc168ebee07bb72b62849815af7434.tar.gz
podman-8931e99a18cc168ebee07bb72b62849815af7434.tar.bz2
podman-8931e99a18cc168ebee07bb72b62849815af7434.zip
API returns 500 in case network is not found instead of 404
Backported-by: Valentin Rothberg <rothberg@redhat.com> Signed-off-by: zhangguanzhang <zhangguanzhang@qq.com>
Diffstat (limited to 'libpod')
-rw-r--r--libpod/define/errors.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/libpod/define/errors.go b/libpod/define/errors.go
index 1e9179353..5cadce396 100644
--- a/libpod/define/errors.go
+++ b/libpod/define/errors.go
@@ -23,6 +23,9 @@ var (
// ErrNoSuchVolume indicates the requested volume does not exist
ErrNoSuchVolume = errors.New("no such volume")
+ // ErrNoSuchNetwork indicates the requested network does not exist
+ ErrNoSuchNetwork = errors.New("network not found")
+
// ErrNoSuchExecSession indicates that the requested exec session does
// not exist.
ErrNoSuchExecSession = errors.New("no such exec session")