in bulkimport/src/main/java/com/microsoft/azure/documentdb/bulkimport/DocumentBulkImporter.java [433:440]
private int getDocumentSizeOrThrow(String document) {
int documentSize = document.getBytes(Charset.forName("UTF-8")).length;
if (documentSize > maxMiniBatchSize) {
logger.error("Document size {} larger than script payload limit. {}", documentSize, maxMiniBatchSize);
throw new UnsupportedOperationException("Cannot import a document whose size is larger than script payload limit.");
}
return documentSize;
}