adoroszlai commented on code in PR #10097:
URL: https://github.com/apache/ozone/pull/10097#discussion_r3115690292
##########
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java:
##########
@@ -988,15 +935,13 @@ private Response createMultipartKey(OzoneVolume volume,
OzoneBucket ozoneBucket,
}
if (ex.getResult() == ResultCodes.NO_SUCH_MULTIPART_UPLOAD_ERROR) {
throw newError(NO_SUCH_UPLOAD, uploadID, ex);
- } else if (isAccessDenied(ex)) {
- throw newError(S3ErrorTable.ACCESS_DENIED, bucketName + "/" + key, ex);
} else if (ex.getResult() == ResultCodes.INVALID_PART) {
OS3Exception os3Exception = newError(
S3ErrorTable.INVALID_ARGUMENT, String.valueOf(partNumber), ex);
os3Exception.setErrorMessage(ex.getMessage());
throw os3Exception;
}
- throw ex;
+ throw newError(bucketName, key, ex);
Review Comment:
Yes, but this is consistent with other existing responses (code from
`master`):
https://github.com/apache/ozone/blob/0039ce6ea39287b4932945c15f268b7628d4dcea/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java#L183
https://github.com/apache/ozone/blob/0039ce6ea39287b4932945c15f268b7628d4dcea/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java#L394
https://github.com/apache/ozone/blob/0039ce6ea39287b4932945c15f268b7628d4dcea/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java#L597
https://github.com/apache/ozone/blob/0039ce6ea39287b4932945c15f268b7628d4dcea/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java#L672
https://github.com/apache/ozone/blob/0039ce6ea39287b4932945c15f268b7628d4dcea/hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/endpoint/ObjectEndpoint.java#L746
Using `bucket/key` seems better, not sure which one matches AWS. We can
change it if needed in follow-up.
--
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]