Add event listener to close notice
Handle failed API requests