if (responseCode == 500 || responseCode == 503) {
// Retrying after InternalError 500, don't throw exception.
} else {
// Throw exception containing the HTTP error fields.
HttpException httpException = new HttpException(
httpMethod.getStatusCode(), httpMethod.getStatusText());
S3ServiceException exception = new S3ServiceException("S3 " + httpMethod.getName()
+ " request failed for '" + httpMethod.getPath() + "' - "
+ "ResponseCode=" + httpMethod.getStatusCode()
+ ", ResponseMessage=" + httpMethod.getStatusText()