Skip to content

aws-cpp-sdk-s3-crt: raise error when failing to write download data#3825

Open
grrtrr wants to merge 1 commit intoaws:mainfrom
grrtrr:issue_3824
Open

aws-cpp-sdk-s3-crt: raise error when failing to write download data#3825
grrtrr wants to merge 1 commit intoaws:mainfrom
grrtrr:issue_3824

Conversation

@grrtrr
Copy link
Copy Markdown
Contributor

@grrtrr grrtrr commented May 8, 2026

Currently the S3CrtClient neither logs nor raises an error when failing to write download data.

To avoid the problem of silent failure, check the failbit/badbit after the calls to write() and flush().
Raise and log the error cause.
Return AWS_OP_ERR to mark the download as failed.

Resolves #3824.

Tested on Linux/ubuntu 22.04.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@grrtrr
Copy link
Copy Markdown
Contributor Author

grrtrr commented May 8, 2026

Log output after applying this patch

With my failing download and this patch, I am now seeing this in the logs:

[ERROR] 2026-05-08 19:54:41.884 S3CrtClient [139836522079808] Failed to write download data
[ERROR] 2026-05-08 19:54:41.884 S3MetaRequest [139836522079808] id=0x7f2e44c62400 Response body callback raised error 59 (Failed writing to file.).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[aws-cpp-sdk-s3-crt] downloads fail silently on local or streambuf write error

1 participant