xichen01 commented on code in PR #8953:
URL: https://github.com/apache/ozone/pull/8953#discussion_r2312500065
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/BucketEndpoint.java:
##########
@@ -813,7 +813,9 @@ public Response putBucketLifecycleConfiguration(
if (ex.getResult() == ResultCodes.ACCESS_DENIED) {
throw S3ErrorTable.newError(S3ErrorTable.ACCESS_DENIED, bucketName);
} else if (ex.getResult() == ResultCodes.INVALID_REQUEST) {
- throw S3ErrorTable.newError(S3ErrorTable.INVALID_REQUEST, bucketName);
+ OS3Exception invalidException = S3ErrorTable.INVALID_REQUEST;
+ invalidException.setErrorMessage(ex.getMessage());
+ throw S3ErrorTable.newError(invalidException, bucketName);
Review Comment:
This `OS3Exception#resource` is not used in `newError`, so adding
`setResource` here is invalid.
--
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]