This is an automated email from the ASF dual-hosted git repository.

hui pushed a commit to branch lmh/fixSonar
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/lmh/fixSonar by this push:
     new 46bfb87ec6d fix IT
46bfb87ec6d is described below

commit 46bfb87ec6df87d49a0514046e5607288320a09c
Author: Minghui Liu <[email protected]>
AuthorDate: Wed Jun 21 21:07:58 2023 +0800

    fix IT
---
 .../src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java   | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java 
b/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
index 067eef1bec6..de26d702261 100644
--- a/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
+++ b/server/src/main/java/org/apache/iotdb/db/utils/ErrorHandlingUtils.java
@@ -127,6 +127,10 @@ public class ErrorHandlingUtils {
     } else if (t instanceof TsFileRuntimeException) {
       return RpcUtils.getStatus(TSStatusCode.TSFILE_PROCESSOR_ERROR, 
rootCause.getMessage());
     } else if (t instanceof SemanticException) {
+      if (t.getCause() instanceof IoTDBException) {
+        return RpcUtils.getStatus(
+            ((IoTDBException) t.getCause()).getErrorCode(), 
rootCause.getMessage());
+      }
       return RpcUtils.getStatus(TSStatusCode.SEMANTIC_ERROR, 
rootCause.getMessage());
     }
 

Reply via email to