diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2020-09-30 11:33:19 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-30 11:33:19 +0000 |
commit | 08d036cbd4225a9802fb8dc7c4da7b53ded3896a (patch) | |
tree | b38e8fa39f94589bfdaf90444d3dfe1dce4b41e8 /pkg/api/handlers/libpod/networks.go | |
parent | 19f080f1af884c1e36f55dc81cd51b0ac91a868a (diff) | |
parent | 22474095abe39c14c902650b08002c0bc89e7e6a (diff) | |
download | podman-08d036cbd4225a9802fb8dc7c4da7b53ded3896a.tar.gz podman-08d036cbd4225a9802fb8dc7c4da7b53ded3896a.tar.bz2 podman-08d036cbd4225a9802fb8dc7c4da7b53ded3896a.zip |
Merge pull request #7825 from rhatdan/exitcode
Fix handling of remove of bogus volumes, networks and Pods
Diffstat (limited to 'pkg/api/handlers/libpod/networks.go')
-rw-r--r-- | pkg/api/handlers/libpod/networks.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/api/handlers/libpod/networks.go b/pkg/api/handlers/libpod/networks.go index dfece2a4e..b3c4840b8 100644 --- a/pkg/api/handlers/libpod/networks.go +++ b/pkg/api/handlers/libpod/networks.go @@ -92,8 +92,8 @@ func RemoveNetwork(w http.ResponseWriter, r *http.Request) { } if reports[0].Err != nil { // If the network cannot be found, we return a 404. - if errors.Cause(err) == define.ErrNoSuchNetwork { - utils.Error(w, "Something went wrong", http.StatusNotFound, err) + if errors.Cause(reports[0].Err) == define.ErrNoSuchNetwork { + utils.Error(w, "Something went wrong", http.StatusNotFound, reports[0].Err) return } } |