From a3144ee234bb048cbea5ac8e403a386807d902df Mon Sep 17 00:00:00 2001 From: Jared Tabor Date: Mon, 4 Dec 2017 13:52:34 -0800 Subject: [PATCH] Update error handling on host service after angular upgrade --- .../inventories/related/hosts/add/host-add.controller.js | 3 ++- awx/ui/client/src/inventories-hosts/shared/hosts.service.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/add/host-add.controller.js b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/add/host-add.controller.js index e9694cebdb..207bdf4f8f 100644 --- a/awx/ui/client/src/inventories-hosts/inventories/related/hosts/add/host-add.controller.js +++ b/awx/ui/client/src/inventories-hosts/inventories/related/hosts/add/host-add.controller.js @@ -45,7 +45,8 @@ export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition' }; HostsService.post(params).then(function(res) { $state.go('^.edit', { host_id: res.data.id }, { reload: true }); - }); + }) + .catch(function(){}); }; } ]; diff --git a/awx/ui/client/src/inventories-hosts/shared/hosts.service.js b/awx/ui/client/src/inventories-hosts/shared/hosts.service.js index 9f074d2628..8624146892 100644 --- a/awx/ui/client/src/inventories-hosts/shared/hosts.service.js +++ b/awx/ui/client/src/inventories-hosts/shared/hosts.service.js @@ -18,7 +18,7 @@ return ''; }, error: function(data, status) { - ProcessErrors($rootScope, data, status, null, { hdr: 'Error!', + ProcessErrors($rootScope, data.data, status, null, { hdr: 'Error!', msg: 'Call to ' + this.url + '. GET returned: ' + status }); }, success: function(data){