Handle exceptions on cares resolver