Handle errors and display notifications