diqiu50 commented on code in PR #6182:
URL: https://github.com/apache/gravitino/pull/6182#discussion_r1912416229
##########
trino-connector/trino-connector/src/main/java/org/apache/gravitino/trino/connector/GravitinoErrorCode.java:
##########
@@ -64,4 +65,9 @@ public enum GravitinoErrorCode implements ErrorCodeSupplier {
public ErrorCode toErrorCode() {
return errorCode;
}
+
+ public static String toSimpleErrorMessage(Exception e) {
+ List<String> lines = e.getMessage().lines().toList();
+ return lines.size() > 1 ? lines.get(0) + lines.get(1) : lines.get(0);
Review Comment:
Yes, the client doesn't need to see the stack trace in the error message.
##########
trino-connector/integration-test/src/test/java/org/apache/gravitino/trino/connector/integration/test/TrinoQueryRunner.java:
##########
@@ -109,17 +110,19 @@ String runQueryOnce(String query) {
session = builder.build();
queryRunner.setSession(session);
}
- return outputStream.toString();
+
+ // avoid the ide capturing the error message as failure
Review Comment:
fix
--
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]