diff --git a/api/server/router/network/network_routes.go b/api/server/router/network/network_routes.go index d6e7334800..b84cc1d2af 100644 --- a/api/server/router/network/network_routes.go +++ b/api/server/router/network/network_routes.go @@ -139,7 +139,11 @@ func (n *networkRouter) deleteNetwork(ctx context.Context, w http.ResponseWriter return err } if _, err := n.clusterProvider.GetNetwork(vars["id"]); err == nil { - return n.clusterProvider.RemoveNetwork(vars["id"]) + if err = n.clusterProvider.RemoveNetwork(vars["id"]); err != nil { + return err + } + w.WriteHeader(http.StatusNoContent) + return nil } if err := n.backend.DeleteNetwork(vars["id"]); err != nil { return err diff --git a/docs/reference/api/docker_remote_api_v1.24.md b/docs/reference/api/docker_remote_api_v1.24.md index c2023d5568..efd0e939cf 100644 --- a/docs/reference/api/docker_remote_api_v1.24.md +++ b/docs/reference/api/docker_remote_api_v1.24.md @@ -4672,7 +4672,9 @@ Stop and remove the service `id` **Example response**: - HTTP/1.1 200 No Content + HTTP/1.1 200 OK + Content-Length: 0 + Content-Type: text/plain; charset=utf-8 **Status codes**: diff --git a/docs/reference/api/docker_remote_api_v1.25.md b/docs/reference/api/docker_remote_api_v1.25.md index c8c8b92da3..872f28b273 100644 --- a/docs/reference/api/docker_remote_api_v1.25.md +++ b/docs/reference/api/docker_remote_api_v1.25.md @@ -5040,7 +5040,9 @@ Stop and remove the service `id` **Example response**: - HTTP/1.1 200 No Content + HTTP/1.1 200 OK + Content-Length: 0 + Content-Type: text/plain; charset=utf-8 **Status codes**: