You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current error handling approach in the put_object operation might not be providing sufficient detail. Specifically, when an error occurs during the put_object operation, we are only sending the crt_error part of the meta request result. This output often looks like: Unknown CRT error: CRT error 14343: aws-c-s3: AWS_ERROR_S3_INVALID_RESPONSE_STATUS, Invalid response status from request
However, the actual error message from the meta request result provides much more clarity. For instance, the full meta request result includes details such as:
MetaRequestResult { response_status: 400, crt_error: Error(14343, "aws-c-s3: AWS_ERROR_S3_INVALID_RESPONSE_STATUS, Invalid response status from request"), error_response_headers: Some(Headers { inner: 0x6000014fc080 }), error_response_body: Some("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>InvalidToken</Code><Message>The provided token is malformed or otherwise invalid.</Message><Token-0>IQoJb3JpZ2luX2VjEDYaCXVzLWVhc3QtMSJIMEYCIQDLFxf8o3wpHIhdDU1dWFvOaHvEOkZOTtDiJRIaNQR2rAIhALPZYJkTUhXtlQK6mcOzR1FpGSKPKZ117zVW9oy+7nWcKp4CCF4QARoMMTE5NjgzNTA4OTE5IgwdiMsiu8ooxC/zMO4q+wGpjTiFPtq2zPMC0+K0czqQQFRVE1Vcmq/QtZDpVsX1vP5c8tfYtQo5GOFvxg1jGx+uUyS3gZ/dtt0gZAXhb1jyoiLz27loUtQHmQCSQNCPeaSTOOrUWP45FYEY3taGHfW+5wu4ersuS9GKcKjKH7BywHq//NU3YzUcwTd+qoTs89eHZeWxzm7kZ5YW5XmHHagAjwKMXlw+Sp+oEgZaYzOLkx4yT3u+CRQ1Wh5jnHxiKITvNXbpwRq4FjTCd3mcmS2KYwk9X2IdOS9IL3ZJfnb8jTe0ssmgj3axbbzVXdzqhcNTRhCVu3P2sFVvj92Fql1LiYsVrsRGyCAlfTCi5fu2BjqcAfThWbs+4+2ke/RRYuzpCcCIWaWkpzYFeLK5CBlgvoGWq4DttxrWcDk6ey6Ftnh5BUcR4T6MZubneVqyS39uc41OQi7qOZ1LYNPQ6NGRXJSyGeai7/+q/SPGGkegbQBgynB1wUoTGb+aMJNR3vSJWwIBH+SLsx5nNCBMlBLdadAHqVpV4RkRZERgHCO+wLtKw2+WwifG7</Token-0><RequestId>30GF3JD37PN8JRRZ</RequestId><HostId>75I4LL0gyd4AE/ClR1FMx72Ub/qNRZc378GHu4LCMUfU8WdDpO3/z5HWzYgZ2BVyuUMZ2+ZLi5XemPTVpolG1g==</HostId></Error>") }
To improve the visibility and accuracy of error reporting, I suggest enhancing the error handling in the put_object operation to properly parse and include both the crt_error and the more detailed error_response_body from the meta request result. This change would provide clearer insights into the nature of the issues encountered.
Relevant log output
No response
The text was updated successfully, but these errors were encountered:
`S3CrtClient::put_object` was originally implemented so that it would
complete immediately and return a `PutObjectRequest` implementation. Any
error from the S3 request would only be returned on calling `write` or
`complete` on the `PutObjectRequest`. With this change, we modify
`put_object` to await for the initial `CreateMultipartUpload` request to
complete and only then either return a `PutObjectRequest` or propagate
the error from the request. This is analogous to what done for
`get_object` in #1171 and addresses an issue where errors were not
propagated correctly (#1007).
At the file handle level, however, we still want the `open` operation to
complete quickly, without waiting for `CreateMultipartUpload` to
complete. In order to preserve the previous behavior, `upload::atomic`
was adapted to spawn a concurrent task in the background when calling
`put_object`.
### Does this change impact existing behavior?
Yes.
### Does this change need a changelog entry?
Yes, for `mountpoint-s3-client`. No user-visible changes in
`mountpoint-s3`.
---
By submitting this pull request, I confirm that my contribution is made
under the terms of the Apache 2.0 license and I agree to the terms of
the [Developer Certificate of Origin
(DCO)](https://developercertificate.org/).
---------
Signed-off-by: Alessandro Passaro <[email protected]>
Mountpoint for Amazon S3 version
Latest version
AWS Region
No response
Describe the running environment
Running in local.
Mountpoint options
What happened?
The current error handling approach in the put_object operation might not be providing sufficient detail. Specifically, when an error occurs during the put_object operation, we are only sending the crt_error part of the meta request result. This output often looks like:
Unknown CRT error: CRT error 14343: aws-c-s3: AWS_ERROR_S3_INVALID_RESPONSE_STATUS, Invalid response status from request
However, the actual error message from the meta request result provides much more clarity. For instance, the full meta request result includes details such as:
To improve the visibility and accuracy of error reporting, I suggest enhancing the error handling in the put_object operation to properly parse and include both the crt_error and the more detailed error_response_body from the meta request result. This change would provide clearer insights into the nature of the issues encountered.
Relevant log output
No response
The text was updated successfully, but these errors were encountered: