From 2f6e16f7baba64e710127539133fe7c2d5ea95dc Mon Sep 17 00:00:00 2001 From: mabashian Date: Tue, 29 Aug 2017 11:41:33 -0400 Subject: [PATCH] Properly catch and display workflow copy error when basic license installed --- .../client/src/templates/list/templates-list.controller.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/awx/ui/client/src/templates/list/templates-list.controller.js b/awx/ui/client/src/templates/list/templates-list.controller.js index 10801d6e61..2a292ade7b 100644 --- a/awx/ui/client/src/templates/list/templates-list.controller.js +++ b/awx/ui/client/src/templates/list/templates-list.controller.js @@ -226,10 +226,11 @@ export default ['$scope', '$rootScope', TemplateCopyService.copyWorkflow(template.id) .then(function(result) { $state.go('templates.editWorkflowJobTemplate', {workflow_job_template_id: result.data.id}, {reload: true}); - }, function (data) { + }) + .catch(function (response) { Wait('stop'); - ProcessErrors($scope, data, status, null, { hdr: 'Error!', - msg: 'Call to copy template failed. POST returned status: ' + status }); + ProcessErrors($scope, response.data, response.status, null, { hdr: 'Error!', + msg: 'Call to copy workflow job template failed. Return status: ' + response.status + '.'}); }); } else {