From 48b2bcf1808622b99320baeb9067bf027808d8ba Mon Sep 17 00:00:00 2001 From: Brian Quinlan Date: Wed, 28 Aug 2024 12:42:01 -0700 Subject: [PATCH] Update cronet_client.dart --- pkgs/cronet_http/lib/src/cronet_client.dart | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/cronet_http/lib/src/cronet_client.dart b/pkgs/cronet_http/lib/src/cronet_client.dart index 28ac921f84..440de8ae35 100644 --- a/pkgs/cronet_http/lib/src/cronet_client.dart +++ b/pkgs/cronet_http/lib/src/cronet_client.dart @@ -396,6 +396,9 @@ class CronetClient extends BaseClient { try { data = body.toJByteBuffer(); } on JniException catch (e) { + // There are no unit tests for this code. You can verify this behavior + // manually by incrementally increasing the amount of body data in + // `CronetClient.post` until you get this exception. if (e.message.contains('java.lang.OutOfMemoryError:')) { throw ClientException( 'Not enough memory for request body: ${e.message}', request.url);