-
Notifications
You must be signed in to change notification settings - Fork 248
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
XmlDecodeError when DeleteResult gets SlowDown #873
Comments
Thanks for reporting this! |
Note, if we use
|
yeah the issue here seems to be that we're getting a 200 back so we don't try to hit the error handler. Will see what the best fix is |
## Motivation and Context - awslabs/aws-sdk-rust#873 ## Description Add a customization for S3 so that if `<Error>` is the root element, we trigger the error parsing flow ## Testing - Added an integration test ## Checklist <!--- If a checkbox below is not applicable, then please DELETE it rather than leaving it unchecked --> - [x] I have updated `CHANGELOG.next.toml` if I made changes to the smithy-rs codegen or runtime crates - [x] I have updated `CHANGELOG.next.toml` if I made changes to the AWS SDK, generated SDK code, or SDK runtime crates ---- _By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice._
|
fix verified |
Thanks! |
Describe the bug
When the response from a DeleteObjects request is HTTP 200 but with a
SlowDown
error, the SDK does not correctly decode the result, resulting in an "Unhandled" error.The Unhandled error says
encountered invalid XML root: expected DeleteResult but got StartEl ... This is likely a bug in the SDK.
The response is a HTTP 200 with a body of<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Error><Code>SlowDown</Code><Message>Please reduce your request rate.</Message>...
We are using AWS S3 (endpoint: "https://s3.us-west-2.amazonaws.com").
Expected Behavior
Not have an Unhandled error. Beyond that I'm not sure; maybe
send().await
should returnOk(DeleteObjectsOutput)
, andDeleteObjectsOutput::errors()
should returnSome
.Current Behavior
The unwrap in the above code fails with:
Reproduction Steps
Our code is similar to:
Possible Solution
No response
Additional Information/Context
No response
Version
Environment details (OS name and version, etc.)
Linux
Logs
No response
The text was updated successfully, but these errors were encountered: