Skip to content

Commit

Permalink
Update cronet_client.dart
Browse files Browse the repository at this point in the history
  • Loading branch information
brianquinlan committed Aug 28, 2024
1 parent 09d8c55 commit 48b2bcf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkgs/cronet_http/lib/src/cronet_client.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 48b2bcf

Please sign in to comment.