yuqi1129 commented on code in PR #6182:
URL: https://github.com/apache/gravitino/pull/6182#discussion_r1910423380


##########
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:
   avoid -> Avoid  
   ide -> IDE



##########
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:
   Would we only output the first two lines of the error message?



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

Reply via email to