Throw error object and not a string
This commit is contained in:
@@ -217,7 +217,7 @@ angular.module('Application').controller('DomainsController', ['$scope', '$locat
|
||||
};
|
||||
|
||||
if (!data.projectId || !data.credentials || !data.credentials.client_email || !data.credentials.private_key) {
|
||||
throw 'fields_missing';
|
||||
throw new Error('One or more fields are missing in the JSON');
|
||||
}
|
||||
} catch (e) {
|
||||
$scope.domainConfigure.error = 'Cannot parse Google Service Account Key: ' + e.message;
|
||||
|
||||
Reference in New Issue
Block a user