Skip to content

Wrong response code from failed precondition If-None-Match #6023

Closed
@bbraatCrwd

Description

@bbraatCrwd

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

  • Select this option if this issue appears to be a regression.

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

Metadata

Metadata

Assignees

Labels

bugThis issue is a bug.closed-for-stalenessp2This is a standard priority issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions