Skip to content

Commit 51d859f

Browse files
grrtrrsbiscigl
authored andcommitted
aws-cpp-sdk-s3-crt: raise error when failing to write download data
1 parent e53cb43 commit 51d859f

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

generated/src/aws-cpp-sdk-s3-crt/source/S3CrtClient.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -593,6 +593,11 @@ int S3CrtClient::S3CrtRequestGetBodyCallback(struct aws_s3_meta_request* meta_re
593593
if (userData->request->IsEventStreamRequest()) {
594594
bodyStream.flush();
595595
}
596+
if (bodyStream.fail()) {
597+
AWS_LOGSTREAM_ERROR(ALLOCATION_TAG, "Failed to write download data");
598+
aws_raise_error(AWS_ERROR_FILE_WRITE_FAILURE);
599+
return AWS_OP_ERR;
600+
}
596601

597602
// Replenish flow-control window (no-op if enable_read_backpressure is not set):
598603
aws_s3_meta_request_increment_read_window(meta_request, body->len);

0 commit comments

Comments
 (0)