Handle failures in xml