Xushaohong commented on code in PR #5160:
URL: https://github.com/apache/ozone/pull/5160#discussion_r1287032405
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/EndpointBase.java:
##########
@@ -290,8 +290,12 @@ protected Map<String, String> getCustomMetadataFromHeaders(
if (sizeInBytes >
OzoneConsts.S3_REQUEST_HEADER_METADATA_SIZE_LIMIT_KB * KB) {
- throw new IllegalArgumentException("Illegal user defined metadata." +
- " Combined size cannot exceed 2KB.");
+ OS3Exception os3Exception = newError(S3ErrorTable.METADATA_TOO_LARGE,
+ key);
+ os3Exception.setErrorMessage("Illegal user defined metadata. " +
Review Comment:
`setErrorMessage` here is nonsense, which completely overlays the
errorMessage in S3ErrorTable.METADATA_TOO_LARGE.
The Description from AWS is not necessary to be strictly followed, the Error
Code should be.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]