diqiu50 commented on code in PR #12991:
URL: https://github.com/apache/gravitino/pull/12991#discussion_r3957441634
##########
catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueExceptionConverter.java:
##########
@@ -49,7 +51,7 @@ static RuntimeException toSchemaException(GlueException e,
String context) {
if (e instanceof InvalidInputException) {
return new IllegalArgumentException(context + ": " + e.getMessage(), e);
}
- return new RuntimeException("Glue error: " + context, e);
+ return new RuntimeException("Glue error: " + context + ": " +
awsErrorDetail(e), e);
Review Comment:
`awsErrorDetails().errorMessage()` is the `Message` field Glue itself
returns to the caller — AWS authors it and never puts credential material in
it, and the ARNs it names are the caller's own identity and resources; on top
of that `ErrorResponse.internalError`
(`common/src/main/java/org/apache/gravitino/dto/responses/ErrorResponse.java:205`)
already serialises the full cause stack trace into the API response, so this
PR moves existing information into a readable field rather than widening
exposure.
##########
catalogs/catalog-glue/src/main/java/org/apache/gravitino/catalog/glue/GlueExceptionConverter.java:
##########
@@ -49,7 +51,7 @@ static RuntimeException toSchemaException(GlueException e,
String context) {
if (e instanceof InvalidInputException) {
return new IllegalArgumentException(context + ": " + e.getMessage(), e);
}
- return new RuntimeException("Glue error: " + context, e);
+ return new RuntimeException("Glue error: " + context + ": " +
awsErrorDetail(e), e);
Review Comment:
No leak here: this is the `Message` Glue itself returns to the caller, and
AWS never puts credential material in it.
--
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]