refactor method of display xform errors