1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-24 15:59:41 +02:00

feat(network): display the correct error message when a network deletion failure occurs

This commit is contained in:
Anthony Lapenna 2016-09-01 11:31:25 +12:00
parent 4edb4e014f
commit 6d6a7e6923
2 changed files with 10 additions and 4 deletions

View file

@ -47,7 +47,7 @@ function ($scope, $state, Network, Config, Messages, errorMsgFilter) {
Network.remove({id: network.Id}, function (d) {
var error = errorMsgFilter(d);
if (error) {
Messages.send("Error", "Unable to remove network with active endpoints");
Messages.send("Error", error);
} else {
Messages.send("Network deleted", network.Id);
var index = $scope.networks.indexOf(network);