throw new CloudFrontServiceException("Encountered too many CloudFront Internal Server errors ("
+ internalErrorCount + "), aborting request.");
}
} else {
// Parse XML error message.
ErrorHandler handler = (new CloudFrontXmlResponsesSaxParser())
.parseErrorResponse(httpMethod.getResponseBodyAsStream());
CloudFrontServiceException exception = new CloudFrontServiceException(
"Request failed with CloudFront Service error",
responseCode, handler.getType(), handler.getCode(),