From babc64b44b341470f4f23569502f8e661b6561ec Mon Sep 17 00:00:00 2001 From: Maximilian Müller Date: Fri, 26 Jun 2020 13:54:34 +0200 Subject: Fix a bug with APIv2 compat network remove to log an ErrNetworkNotFound instead of nil MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Maximilian Müller --- pkg/api/handlers/compat/networks.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/api/handlers/compat/networks.go b/pkg/api/handlers/compat/networks.go index 0f1eca5e5..7209255d7 100644 --- a/pkg/api/handlers/compat/networks.go +++ b/pkg/api/handlers/compat/networks.go @@ -285,7 +285,7 @@ func RemoveNetwork(w http.ResponseWriter, r *http.Request) { return } if !exists { - utils.Error(w, "network not found", http.StatusNotFound, err) + utils.Error(w, "network not found", http.StatusNotFound, network.ErrNetworkNotFound) return } if err := network.RemoveNetwork(config, name); err != nil { -- cgit v1.2.3-54-g00ecf