duongnguyen0 commented on code in PR #3594:
URL: https://github.com/apache/ozone/pull/3594#discussion_r925065007


##########
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:
   I'm not sure why there's a `NO_SUCH_VOLUME` in S3ErrorTable and it's unused 
now. If we use it, S3 client would yield an error message like:
   ```
   An error occurred (NoSuchVolume) when calling the operation: The specified 
volume does not exist.
   ```
   And that sounds a bit weird for the S3 clients as they're not supposed to 
create a volume.



-- 
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]

Reply via email to