>It would be more helpful for integrators when displaying the right error >(page not found, host does >not exist or connection refused) instead of a parsing error.
If that's what you want, you'll have to solve it in your application by distinguishing the error response from the XML response and only trying to parse the latter as XML. Or by trying, failing, using that to recognize it as the error and handing that off to code which knows how to read the error... perhaps by running a processor on it which knows how to turn it into XML.
