Handle location form submit errors for (sub)domains
This commit is contained in:
@@ -197,6 +197,17 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
};
|
||||
|
||||
Client.configureApp($scope.app.id, 'location', data, function (error) {
|
||||
if (error && error.statusCode === 409) {
|
||||
if (error.location && error.domain) {
|
||||
$scope.location.error.location = error.message;
|
||||
$scope.locationForm.$setPristine();
|
||||
} else {
|
||||
$scope.location.error.alternateDomains = error.message;
|
||||
}
|
||||
|
||||
$scope.location.busy = false;
|
||||
return;
|
||||
}
|
||||
if (error) return Client.error(error);
|
||||
|
||||
$scope.location.success = true;
|
||||
|
||||
Reference in New Issue
Block a user