adoroszlai commented on a change in pull request #3167:
URL: https://github.com/apache/ozone/pull/3167#discussion_r822301085
##########
File path:
hadoop-ozone/s3gateway/src/main/java/org/apache/hadoop/ozone/s3/OzoneClientProducer.java
##########
@@ -106,7 +107,7 @@ public S3Auth getSignature() {
// For any other critical errors during object creation throw Internal
// error.
LOG.debug("Error during Client Creation: ", e);
- throw wrapOS3Exception(INTERNAL_ERROR);
+ throw wrapOS3Exception(S3ErrorTable.getInternalError(e));
Review comment:
It seems improving `wrapOS3Exception` is enough for getting friendly
message for errors correctable by user. I'd skip this part of the change (and
the one in `S3ErrorTable`).
To make sure the error is logged on S3 Gateway we utilize
`S3ErrorTable.newError`, which has related logic:
```suggestion
throw wrapOS3Exception(S3ErrorTable.newError(INTERNAL_ERROR, null, e));
```
(Not sure if second parameter `resource` could be anything meaningful here,
so it is `null` in my example.)
--
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]