An error handling service for AngularJS