Use error codes and fields

This commit is contained in:
Girish Ramakrishnan
2019-09-02 17:28:40 -07:00
parent 7e81041b87
commit 7d44c87aff
+3 -3
View File
@@ -191,9 +191,9 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.subscriptionHelperPage = 'app_install_subscription_required.html';
}
} else if (error.statusCode === 409) {
if (error.reason === 'Port Conflict') {
if (error.portName) {
$scope.appInstall.error.port = error.message;
} else if (error.reason === 'Location Conflict') {
} else if (error.domain) {
$scope.appInstall.error.location = error.message;
$scope.appInstallForm.location.$setPristine();
$('#appInstallLocationInput').focus();
@@ -201,7 +201,7 @@ angular.module('Application').controller('AppStoreController', ['$scope', '$loca
$scope.appInstall.error.other = error.message;
}
} else if (error.statusCode === 400) {
if (error.reason === 'Invalid certificate') {
if (error.field === 'cert') {
$scope.appInstall.error.cert = error.message;
$scope.appInstall.certificateFileName = '';
$scope.appInstall.certificateFile = null;