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


##########
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:
   got it, thanks @kerneltime @smengcl  for identifying this. I've update the 
code so that VOLUME_NOT_FOUND is treated as a system error (client receives 
`INTERNAL_SERVER_ERROR` and errors is in both logs).



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