Merge pull request #765 from jaredevantabor/fix-764

Update error handling on host service after angular upgrade
This commit is contained in:
Jared Tabor
2017-12-04 14:28:41 -08:00
committed by GitHub
2 changed files with 3 additions and 2 deletions

View File

@@ -45,7 +45,8 @@ export default ['$state', '$stateParams', '$scope', 'RelatedHostsFormDefinition'
}; };
HostsService.post(params).then(function(res) { HostsService.post(params).then(function(res) {
$state.go('^.edit', { host_id: res.data.id }, { reload: true }); $state.go('^.edit', { host_id: res.data.id }, { reload: true });
}); })
.catch(function(){});
}; };
} }
]; ];

View File

@@ -18,7 +18,7 @@
return ''; return '';
}, },
error: function(data, status) { 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 }); msg: 'Call to ' + this.url + '. GET returned: ' + status });
}, },
success: function(data){ success: function(data){