Gracefully shutdown answer_server when an exception occurs.