File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/main/java/software/amazon/encryption/s3/internal Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 33import java .time .Instant ;
44import java .util .Map ;
55
6+ import org .apache .commons .logging .LogFactory ;
67import software .amazon .awssdk .services .s3 .model .ChecksumType ;
78import software .amazon .awssdk .services .s3 .model .CompleteMultipartUploadResponse ;
89import software .amazon .awssdk .services .s3 .model .CreateMultipartUploadRequest ;
@@ -198,8 +199,16 @@ public static PutObjectResponse convertResponse(CompleteMultipartUploadResponse
198199 // These fields exist only in CompleteMultipartUploadResponse, not in PutObjectResponse
199200 break ;
200201 default :
201- // We should silently drop unknown fields because,
202- // once the object is stored we expect to return success response.
202+ // We should NOT throw an exception for unknown fields because
203+ // once the object is stored, we expect to return a successful response.
204+ // Emit a log at info level for awareness.
205+ LogFactory .getLog (ConvertSDKRequests .class ).info (f .memberName () + " returned in CompleteMultipartUploadResponse for "
206+ + response .key () + " is an unknown field." +
207+ "The S3 Encryption Client does not recognize this option and cannot set it on the CompleteMultipartUploadResponse." +
208+ "This may be a new S3 feature." +
209+ "Please report this to the Amazon S3 Encryption Client for Java: " +
210+ "https://github.com/aws/amazon-s3-encryption-client-java/issues."
211+ );
203212 break ;
204213 }
205214 }
You can’t perform that action at this time.
0 commit comments