diff --git a/awx/ui/client/src/workflow-results/workflow-results.service.js b/awx/ui/client/src/workflow-results/workflow-results.service.js index 41bc410647..0db1f7a78c 100644 --- a/awx/ui/client/src/workflow-results/workflow-results.service.js +++ b/awx/ui/client/src/workflow-results/workflow-results.service.js @@ -5,7 +5,7 @@ *************************************************/ -export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErrors', 'WorkflowJobModel', '$interval', 'moment', function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, WorkflowJob, $interval, moment) { +export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErrors', 'WorkflowJobModel', '$interval', 'moment', 'ComponentsStrings', function ($q, Prompt, $filter, Wait, Rest, $state, ProcessErrors, WorkflowJob, $interval, moment, strings) { var val = { getCounts: function(workflowNodes){ var nodeArr = []; @@ -113,6 +113,11 @@ export default ['$q', 'Prompt', '$filter', 'Wait', 'Rest', '$state', 'ProcessErr id: scope.workflow.id }).then((launchRes) => { $state.go('workflowResults', { id: launchRes.data.id }, { reload: true }); + }).catch(({ data, status, config }) => { + ProcessErrors(scope, data, status, null, { + hdr: strings.get('error.HEADER'), + msg: strings.get('error.CALL', { path: `${config.url}`, status }) + }); }); }, createOneSecondTimer: function(startTime, fn) { diff --git a/awx/ui/test/spec/workflow--results/workflow-results.controller-test.js b/awx/ui/test/spec/workflow--results/workflow-results.controller-test.js index 4976ce1306..34401f6d78 100644 --- a/awx/ui/test/spec/workflow--results/workflow-results.controller-test.js +++ b/awx/ui/test/spec/workflow--results/workflow-results.controller-test.js @@ -18,7 +18,7 @@ describe('Controller: workflowResults', () => { beforeEach(angular.mock.module('workflowResults', ($provide) => { ['PromptDialog', 'Prompt', 'Wait', 'Rest', '$state', 'ProcessErrors', - 'jobLabels', 'workflowNodes', 'count', 'WorkflowJobModel', + 'jobLabels', 'workflowNodes', 'count', 'WorkflowJobModel', 'ComponentsStrings' ].forEach((item) => { $provide.value(item, {}); }); diff --git a/awx/ui/test/spec/workflow--results/workflow-results.service-test.js b/awx/ui/test/spec/workflow--results/workflow-results.service-test.js index c730fc0dcf..f7d6a80426 100644 --- a/awx/ui/test/spec/workflow--results/workflow-results.service-test.js +++ b/awx/ui/test/spec/workflow--results/workflow-results.service-test.js @@ -6,7 +6,7 @@ describe('workflowResultsService', () => { let $interval; beforeEach(angular.mock.module('workflowResults', ($provide) => { - ['PromptDialog', 'Prompt', 'Wait', 'Rest', 'ProcessErrors', '$state', 'WorkflowJobModel'] + ['PromptDialog', 'Prompt', 'Wait', 'Rest', 'ProcessErrors', '$state', 'WorkflowJobModel', 'ComponentsStrings'] .forEach(function(item) { $provide.value(item, {}); });