Handle location change api key invalid error
This commit is contained in:
@@ -241,7 +241,15 @@ angular.module('Application').controller('AppController', ['$scope', '$location'
|
||||
if (overwriteDns) return callback();
|
||||
|
||||
Client.getDNSRecords(domain.domain, domain.subdomain, 'A', function (error, result) {
|
||||
// TODO handle credential errors
|
||||
if (error && error.statusCode === 424) {
|
||||
if (data.domain === domain.domain && data.location === domain.subdomain) {
|
||||
$scope.location.error.location = domain.domain + ' ' + error.message;
|
||||
} else {
|
||||
$scope.location.error.alternateDomains = domain.domain + ' ' + error.message;
|
||||
}
|
||||
$scope.location.busy = false;
|
||||
return;
|
||||
}
|
||||
if (error) return callback(error);
|
||||
|
||||
if (result.length) $scope.location.domainCollisions.push(domain);
|
||||
|
||||
Reference in New Issue
Block a user