catch errors from xml2js