From 83a656653d500a5cedbfe5bf7785da596d50adfa Mon Sep 17 00:00:00 2001 From: John Mitchell Date: Tue, 5 Apr 2016 10:33:03 -0400 Subject: [PATCH] add error handling of admin of org call --- awx/ui/client/src/controllers/Credentials.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/awx/ui/client/src/controllers/Credentials.js b/awx/ui/client/src/controllers/Credentials.js index 5af27f9f65..7b9a75acd8 100644 --- a/awx/ui/client/src/controllers/Credentials.js +++ b/awx/ui/client/src/controllers/Credentials.js @@ -182,6 +182,8 @@ export function CredentialsAdd($scope, $rootScope, $compile, $location, $log, Rest.get() .success(function(data) { $scope.canShareCredential = (data.count) ? true : false; + }).error(function (data, status) { + ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to find if users is admin of org' + status }); }); } @@ -342,6 +344,8 @@ export function CredentialsEdit($scope, $rootScope, $compile, $location, $log, Rest.get() .success(function(data) { $scope.canShareCredential = (data.count) ? true : false; + }).error(function (data, status) { + ProcessErrors($scope, data, status, null, { hdr: 'Error!', msg: 'Failed to find if users is admin of org' + status }); }); }