Restfull Error Handler for AngularJS apps