Modified DefaultErrorResponseHandler to handle malformed XML responses by retrying request.