From 8931e99a18cc168ebee07bb72b62849815af7434 Mon Sep 17 00:00:00 2001 From: zhangguanzhang Date: Sun, 2 Aug 2020 21:08:13 +0800 Subject: API returns 500 in case network is not found instead of 404 Backported-by: Valentin Rothberg Signed-off-by: zhangguanzhang --- libpod/define/errors.go | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libpod') 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") -- cgit v1.2.3-54-g00ecf