Fix parsing of XML error messages from the API