diff --git a/awx/ui/client/src/organizations/main.js b/awx/ui/client/src/organizations/main.js index bb21bfb6c0..a0b179261f 100644 --- a/awx/ui/client/src/organizations/main.js +++ b/awx/ui/client/src/organizations/main.js @@ -56,13 +56,30 @@ angular.module('Organizations', [ }, resolve: { add: { - ConfigData: ['ConfigService', (ConfigService) => { - return ConfigService.getConfig().then(response => response); + ConfigData: ['ConfigService', 'ProcessErrors', (ConfigService, ProcessErrors) => { + return ConfigService.getConfig() + .then(response => response) + .catch(({data, status}) => { + ProcessErrors(null, data, status, null, { + hdr: 'Error!', + msg: 'Failed to get config. GET returned status: ' + + 'status: ' + status + }); + }); + }] }, edit: { - ConfigData: ['ConfigService', (ConfigService) => { - return ConfigService.getConfig().then(response => response); + ConfigData: ['ConfigService', 'ProcessErrors', (ConfigService, ProcessErrors) => { + return ConfigService.getConfig() + .then(response => response) + .catch(({data, status}) => { + ProcessErrors(null, data, status, null, { + hdr: 'Error!', + msg: 'Failed to get config. GET returned status: ' + + 'status: ' + status + }); + }); }], InstanceGroupsData: ['$stateParams', 'Rest', 'GetBasePath', 'ProcessErrors', function($stateParams, Rest, GetBasePath, ProcessErrors){ diff --git a/awx/ui/client/src/projects/main.js b/awx/ui/client/src/projects/main.js index c997f2a5c0..94eee1de34 100644 --- a/awx/ui/client/src/projects/main.js +++ b/awx/ui/client/src/projects/main.js @@ -48,8 +48,16 @@ angular.module('Projects', []) }); } ], - ConfigData: ['ConfigService', (ConfigService) => { - return ConfigService.getConfig().then(response => response); + ConfigData: ['ConfigService', 'ProcessErrors', (ConfigService, ProcessErrors) => { + return ConfigService.getConfig() + .then(response => response) + .catch(({data, status}) => { + ProcessErrors(null, data, status, null, { + hdr: 'Error!', + msg: 'Failed to get config. GET returned status: ' + + 'status: ' + status + }); + }); }] }; diff --git a/awx/ui/client/src/templates/main.js b/awx/ui/client/src/templates/main.js index 21ec6ce323..144d597e2e 100644 --- a/awx/ui/client/src/templates/main.js +++ b/awx/ui/client/src/templates/main.js @@ -130,8 +130,16 @@ angular.module('templates', [surveyMaker.name, jobTemplates.name, labels.name, p }); }); }], - ConfigData: ['ConfigService', (ConfigService) => { - return ConfigService.getConfig().then(response => response); + ConfigData: ['ConfigService', 'ProcessErrors', (ConfigService, ProcessErrors) => { + return ConfigService.getConfig() + .then(response => response) + .catch(({data, status}) => { + ProcessErrors(null, data, status, null, { + hdr: 'Error!', + msg: 'Failed to get config. GET returned status: ' + + 'status: ' + status + }); + }); }] } } @@ -264,8 +272,16 @@ angular.module('templates', [surveyMaker.name, jobTemplates.name, labels.name, p }); }); }], - ConfigData: ['ConfigService', (ConfigService) => { - return ConfigService.getConfig().then(response => response); + ConfigData: ['ConfigService', 'ProcessErrors', (ConfigService, ProcessErrors) => { + return ConfigService.getConfig() + .then(response => response) + .catch(({data, status}) => { + ProcessErrors(null, data, status, null, { + hdr: 'Error!', + msg: 'Failed to get config. GET returned status: ' + + 'status: ' + status + }); + }); }] } }