handle exception when parsing xml response