A global error handler for angular