KEYCLOAK-4462: Unexpected error when creating client with existing

ClientID
This commit is contained in:
Stan Silvert 2017-05-01 18:13:27 -04:00
parent 93ef2ec9bf
commit b8fecca0ba
2 changed files with 2 additions and 12 deletions

View file

@ -1943,6 +1943,8 @@ module.factory('errorInterceptor', function($q, $window, $rootScope, $location,
} else if (response.status) {
if (response.data && response.data.errorMessage) {
Notifications.error(response.data.errorMessage);
} else if (response.data && response.data.error_description) {
Notifications.error(response.data.error_description);
} else {
Notifications.error("An unexpected server error has occurred");
}

View file

@ -1229,12 +1229,6 @@ module.controller('ClientDetailCtrl', function($scope, realm, client, templates,
}, $scope.clientEdit, function() {
$route.reload();
Notifications.success("Your changes have been saved to the client.");
}, function(error) {
if (error.status == 400 && error.data.error_description) {
Notifications.error(error.data.error_description);
} else {
Notifications.error('Unexpected error when updating client');
}
});
}
};
@ -1348,12 +1342,6 @@ module.controller('CreateClientCtrl', function($scope, realm, client, templates,
var id = l.substring(l.lastIndexOf("/") + 1);
$location.url("/realms/" + realm.realm + "/clients/" + id);
Notifications.success("The client has been created.");
}, function(error) {
if (error.status == 400 && error.data.error_description) {
Notifications.error(error.data.error_description);
} else {
Notifications.error('Unexpected error when creating client');
}
});
};