Error Handling in AngularJS — a practical guide to AngularJS error handling with clear examples you can reuse in real projects.
AngularJS Tutorial Series (70/99). Prefer one article? Read the complete AngularJS tutorial.
Short description
Global $http interceptors can normalize API errors.
Error tip
$http.get('/api/items').then(success, function (err) {
vm.error = (err.data && err.data.message) || 'Request failed';
});