How to handle $resource service errors in AngularJS

you can pass the error handler as a second parameter toquery. Category.query(function(data) {}, function() {}); EDIT: to make things a bit clearer, some examples: var Resource = $resource(‘/restapi/resource’); Resource.query(function(data) { // success handler }, function(error) { // error handler }); Resource.query({ ‘query’: ‘thequery’ },function(data) { // success handler }, function(error) { // error handler }); … Read more