Fix a bug with APIv2 compat network remove to log an ErrNetworkNotFound instead of nil

Signed-off-by: Maximilian Müller <maxm123@techie.com>
This commit is contained in:
Maximilian Müller 2020-06-26 13:54:34 +02:00
parent 673116c063
commit babc64b44b
1 changed files with 1 additions and 1 deletions

View File

@ -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 {