How to handle unexpected events