awslabs / aws-c-s3

C99 library implementation for communicating with the S3 service, designed for maximizing throughput on high bandwidth EC2 instances.
Apache License 2.0
93 stars 37 forks source link

Report `aws_s3_meta_request_result::error_response_body` for server-side errors #432

Closed vladem closed 3 months ago

vladem commented 3 months ago

Issue #, if available: No

Description of changes: Today the response_status / error_response_body of the last failed request are only reported in finish_callback for AWS_ERROR_S3_INVALID_RESPONSE_STATUS error code . In order to have access to that information in case of, e.g. AWS_ERROR_S3_SLOW_DOWN, we need to do this change.

The alternatives - telemetry_callback and body_callback - are not that usable to achieve that. Specifically to record the body of the last failed S3 request of the meta-request. Is body_callback even invoked in case of a failure?

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.