-
Notifications
You must be signed in to change notification settings - Fork 893
Wrong response code from failed precondition If-None-Match #6023
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
Comments
Understood. Can you provide a code snippet showing the s3 client and the GetObject request call, so I can try to reproduce the same conditions? |
so it is an exception being triggered -but the status code is 200? odd |
This is on upload, not download. The example I was looking at was on a multipart upload during one of the upload part calls: |
That is correct, we receive it like any other exception, but the status code is a 200 instead of the expected 412 |
@bbraatCrwd sorry, you're right, I'm wondering if this is a s3 server-side issue - the SDK usually don't modify a response status code, according to the exception you pasted it looks like the 200 was sent by s3, the SDK is only unmarshalling the response. Maybe some edge case of what is described in the multipart upload scenario here. One way to confirm this is to generate the verbose wirelogs and get the actual response at the error moment (instructions for the verbose wirelogs can be found in our Dev Guide); the other is to reach out to the s3 team with your request ID (you'll need to provide a more recent one) and ask them to investigate. Let us know what you think. |
Describe the bug
When submitting a write to an object in S3 with the If-None-Match header set in the SDK, a 200 response code can occasionally be returned along with the expected Exception, rather than the expected 412 response code.
Regression Issue
Expected Behavior
I expect to see a 412 response code every time this pre-condition is not met. The flakiness of the response code makes handling the return more cumbersome.
Current Behavior
This is a possible Exception/response payload that can be returned on failing the pre-condition:
software.amazon.awssdk.services.s3.model.S3Exception: At least one of the pre-conditions you specified did not hold (Service: S3, Status Code: 200, Request ID: 9YD49V2HRSDRS8K1, Extended Request ID: jUpbn2VaLT6Kwi6vyaN32y1OOWX0ShIocGfV+9+I7qG7kmmAR7kVCA3WATwcjpDMPdTEg3hLPuI=)
Reproduction Steps
The issue happens intermittently on the S3 side and it is not clear how to reproduce.
Possible Solution
No response
Additional Information/Context
No response
AWS Java SDK version used
2.29.1
JDK version used
24
Operating System and version
Multiple environments
The text was updated successfully, but these errors were encountered: