xtern commented on code in PR #2271:
URL: https://github.com/apache/ignite-3/pull/2271#discussion_r1269912507


##########
modules/cli/src/main/java/org/apache/ignite/internal/cli/core/exception/handler/SqlExceptionHandler.java:
##########
@@ -57,11 +57,11 @@ public class SqlExceptionHandler implements 
ExceptionHandler<SQLException> {
     /** Default constructor. */
     public SqlExceptionHandler() {
         sqlExceptionMappers.put(Client.CONNECTION_ERR, 
this::connectionErrUiComponent);
-        sqlExceptionMappers.put(Sql.QUERY_INVALID_ERR, 
this::invalidQueryErrUiComponent);
+        sqlExceptionMappers.put(Sql.STMT_PARSE_ERR, 
this::sqlParseErrUiComponent);
     }
 
-    private ErrorComponentBuilder invalidQueryErrUiComponent(IgniteException 
e) {
-        return fromExWithHeader(PARSING_ERROR_MESSAGE, e.code(), e.traceId(), 
e.getMessage());
+    private ErrorComponentBuilder sqlParseErrUiComponent(IgniteException e) {
+        return fromExWithHeader(PARSING_ERROR_MESSAGE, e.errorCode(), 
e.traceId(), e.getMessage());

Review Comment:
   (just for clarification) this is expected to be `e.codeAsString()` (and not 
just code within a group), but it doesn't work right now anyway. It just looks 
weird that you are changing this code and not changing it in neighboring 
methods :sunglasses:  
   
   Also not so long ago a similar change was made, but vice versa 
https://github.com/apache/ignite-3/commit/93ebaf441b0a3b761d2ae48547d4d03d64f86b61#diff-3a374590342b51f519dc35c4b74f357241cf5ad1c6889c0f05a77ec5fd1dbf3e
 and it looks even more stranger...



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to