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){