duongnguyen0 commented on code in PR #3594:
URL: https://github.com/apache/ozone/pull/3594#discussion_r925036117
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -230,6 +233,9 @@ public Response put(
throw os3Exception;
} else if (ex.getResult() == ResultCodes.PERMISSION_DENIED) {
throw newError(S3ErrorTable.ACCESS_DENIED, keyPath, ex);
+ } else if (ex.getResult() == ResultCodes.BUCKET_NOT_FOUND
+ || ex.getResult() == ResultCodes.VOLUME_NOT_FOUND) {
+ throw newError(S3ErrorTable.NO_SUCH_BUCKET, bucketName, ex);
Review Comment:
Thanks for the detailed review @smengcl.
We already log the original exception in the audit log a few lines before.
And this part of the code is only to help translate OMException to S3 API
responses where the volume concept is not a part of.
--
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]