You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by qi...@apache.org on 2022/11/18 07:09:21 UTC

[iotdb] branch master updated: [IOTDB-4498] Adjust error code (#8026)

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

qiaojialin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/master by this push:
     new 176e637a1a [IOTDB-4498] Adjust error code (#8026)
176e637a1a is described below

commit 176e637a1ac3c855dfc6eef53f17bf05db2f9085
Author: Jialin Qiao <qj...@mails.tsinghua.edu.cn>
AuthorDate: Fri Nov 18 15:09:15 2022 +0800

    [IOTDB-4498] Adjust error code (#8026)
---
 .../client/sync/SyncConfigNodeClientPool.java      |   5 +-
 .../client/sync/SyncDataNodeClientPool.java        |   6 +-
 ...n.java => NoAvailableRegionGroupException.java} |   4 +-
 .../confignode/manager/ClusterSchemaManager.java   |   2 +-
 .../iotdb/confignode/manager/ConfigManager.java    |   2 +-
 .../iotdb/confignode/manager/ConsensusManager.java |   2 +-
 .../iotdb/confignode/manager/ProcedureManager.java |   2 +-
 .../iotdb/confignode/manager/load/LoadManager.java |   6 +-
 .../manager/load/balancer/PartitionBalancer.java   |   6 +-
 .../partition/GreedyPartitionAllocator.java        |   6 +-
 .../balancer/partition/IPartitionAllocator.java    |   6 +-
 .../iotdb/confignode/manager/node/NodeManager.java |   6 +-
 .../manager/partition/PartitionManager.java        |  18 +-
 .../iotdb/confignode/persistence/AuthorInfo.java   |   4 +-
 .../iotdb/confignode/service/ConfigNode.java       |   4 +-
 .../multileader/MultiLeaderConsensus.java          |   2 +-
 .../multileader/client/DispatchLogHandler.java     |   2 +-
 .../service/MultiLeaderRPCServiceProcessor.java    |   2 +-
 .../iotdb/consensus/simple/SimpleConsensus.java    |   2 +-
 docs/UserGuide/API/Status-Codes.md                 | 229 +++++++++--------
 docs/zh/UserGuide/API/Status-Codes.md              | 231 +++++++++--------
 .../org/apache/iotdb/db/it/IoTDBDeletionIT.java    |   4 +-
 .../org/apache/iotdb/db/it/IoTDBEncodingIT.java    |   3 +-
 .../iotdb/db/it/IoTDBPartialInsertionIT.java       |   7 +-
 .../org/apache/iotdb/db/it/IoTDBSimpleQueryIT.java |  19 +-
 .../it/IoTDBSyntaxConventionStringLiteralIT.java   |  46 ++--
 .../java/org/apache/iotdb/db/it/IoTDBTtlIT.java    |   4 +-
 .../db/it/aligned/IoTDBAlignedDataDeletionIT.java  |   4 +-
 .../java/org/apache/iotdb/db/it/cq/IoTDBCQIT.java  |  42 +++-
 .../apache/iotdb/db/it/groupby/IoTDBHavingIT.java  |  13 +-
 .../org/apache/iotdb/db/it/query/IoTDBInIT.java    |  20 +-
 .../db/it/schema/IoTDBCreateStorageGroupIT.java    |  11 +-
 .../db/it/schema/IoTDBDeactivateTemplateIT.java    |   8 +-
 .../db/it/schema/IoTDBDeleteTimeseriesIT.java      |   7 +-
 .../iotdb/db/it/schema/IoTDBSchemaTemplateIT.java  |  21 +-
 .../db/it/trigger/IoTDBTriggerManagementIT.java    |  13 +-
 .../session/it/IoTDBSessionSchemaTemplateIT.java   |  12 +-
 .../iotdb/session/it/IoTDBSessionSimpleIT.java     |  26 +-
 .../iotdb/db/integration/IoTDBAuthorizationIT.java |   5 +-
 .../db/integration/IoTDBSchemaTemplateIT.java      |  21 +-
 .../java/org/apache/iotdb/jdbc/IoTDBStatement.java |   4 +-
 .../commons/exception/IllegalPathException.java    |   4 +-
 .../apache/iotdb/commons/utils/StatusUtils.java    |  17 +-
 .../iotdb/db/auth/StandaloneAuthorityFetcher.java  |   2 +-
 .../apache/iotdb/db/client/ConfigNodeClient.java   |   2 +-
 .../apache/iotdb/db/engine/StorageEngineV2.java    |   8 +-
 .../db/exception/ContinuousQueryException.java     |  36 ---
 .../iotdb/db/exception/DataRegionException.java    |   4 +-
 .../exception/StorageEngineReadonlyException.java  |   2 +-
 .../iotdb/db/exception/SystemCheckException.java   |  34 ---
 .../index/UnsupportedIndexTypeException.java       |  32 ---
 .../exception/metadata/DeleteFailedException.java  |  40 ---
 .../apache/iotdb/db/index/common/IndexType.java    |  10 +-
 .../schemaregion/SchemaRegionMemoryImpl.java       |  16 +-
 .../schemaregion/SchemaRegionSchemaFileImpl.java   |  16 +-
 .../operator/process/AbstractIntoOperator.java     |   2 +-
 .../db/mpp/plan/execution/QueryExecution.java      |   5 +-
 .../config/executor/ClusterConfigTaskExecutor.java |  12 +-
 .../db/mpp/plan/planner/LocalExecutionPlanner.java |   2 +-
 .../db/mpp/plan/scheduler/StandaloneScheduler.java |   2 +-
 .../protocol/rest/filter/AuthorizationFilter.java  |   4 +-
 .../protocol/rest/impl/GrafanaApiServiceImpl.java  |   6 +-
 .../db/protocol/rest/impl/RestApiServiceImpl.java  |   6 +-
 .../iotdb/db/query/control/SessionManager.java     |   2 +-
 .../service/thrift/impl/ClientRPCServiceImpl.java  |   4 +-
 .../impl/DataNodeInternalRPCServiceImpl.java       |   6 +-
 .../service/thrift/impl/DataNodeRegionManager.java |   2 +-
 .../db/service/thrift/impl/TSServiceImpl.java      |   2 +-
 .../java/org/apache/iotdb/db/tools/WalChecker.java |  10 +-
 .../apache/iotdb/db/utils/ErrorHandlingUtils.java  |   8 +-
 .../iotdb/db/wal/exception/WALException.java       |   6 +-
 .../org/apache/iotdb/db/tools/WalCheckerTest.java  |  12 +-
 .../main/java/org/apache/iotdb/rpc/RpcUtils.java   |   8 +-
 .../java/org/apache/iotdb/rpc/TSStatusCode.java    | 273 +++++++++++----------
 74 files changed, 691 insertions(+), 741 deletions(-)

diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java b/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java
index 99fe08b702..e7e322e1f6 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncConfigNodeClientPool.java
@@ -102,7 +102,8 @@ public class SyncConfigNodeClientPool {
     }
     LOGGER.error("{} failed on ConfigNode {}", requestType, endPoint, lastException);
     return RpcUtils.getStatus(
-        TSStatusCode.ALL_RETRY_ERROR, "All retry failed due to: " + lastException.getMessage());
+        TSStatusCode.INTERNAL_REQUEST_RETRY_ERROR,
+        "All retry failed due to: " + lastException.getMessage());
   }
 
   /**
@@ -115,7 +116,7 @@ public class SyncConfigNodeClientPool {
       TConfigNodeLocation configNodeLocation, SyncConfigNodeIServiceClient client)
       throws TException, IOException, InterruptedException {
     TSStatus status = client.removeConfigNode(configNodeLocation);
-    while (status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+    while (status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       TimeUnit.MILLISECONDS.sleep(2000);
       updateConfigNodeLeader(status);
       try (SyncConfigNodeIServiceClient clientLeader =
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java b/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java
index 5d5c5c6bb1..ec2de81350 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/client/sync/SyncDataNodeClientPool.java
@@ -81,7 +81,7 @@ public class SyncDataNodeClientPool {
       }
     }
     LOGGER.error("{} failed on DataNode {}", requestType, endPoint, lastException);
-    return new TSStatus(TSStatusCode.ALL_RETRY_ERROR.getStatusCode())
+    return new TSStatus(TSStatusCode.INTERNAL_REQUEST_RETRY_ERROR.getStatusCode())
         .setMessage("All retry failed due to: " + lastException.getMessage());
   }
 
@@ -105,7 +105,7 @@ public class SyncDataNodeClientPool {
       }
     }
     LOGGER.error("{} failed on DataNode {}", requestType, endPoint, lastException);
-    return new TSStatus(TSStatusCode.ALL_RETRY_ERROR.getStatusCode())
+    return new TSStatus(TSStatusCode.INTERNAL_REQUEST_RETRY_ERROR.getStatusCode())
         .setMessage("All retry failed due to: " + lastException.getMessage());
   }
 
@@ -179,7 +179,7 @@ public class SyncDataNodeClientPool {
       status = client.changeRegionLeader(req);
     } catch (IOException e) {
       LOGGER.error("Can't connect to Data node: {}", dataNode, e);
-      status = new TSStatus(TSStatusCode.NO_CONNECTION.getStatusCode());
+      status = new TSStatus(TSStatusCode.CAN_NOT_CONNECT_DATANODE.getStatusCode());
       status.setMessage(e.getMessage());
     } catch (TException e) {
       LOGGER.error("Change regions leader error on Date node: {}", dataNode, e);
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/exception/NotAvailableRegionGroupException.java b/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java
similarity index 89%
rename from confignode/src/main/java/org/apache/iotdb/confignode/exception/NotAvailableRegionGroupException.java
rename to confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java
index c7b44f36d9..6ca721eebf 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/exception/NotAvailableRegionGroupException.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/exception/NoAvailableRegionGroupException.java
@@ -20,12 +20,12 @@ package org.apache.iotdb.confignode.exception;
 
 import org.apache.iotdb.common.rpc.thrift.TConsensusGroupType;
 
-public class NotAvailableRegionGroupException extends ConfigNodeException {
+public class NoAvailableRegionGroupException extends ConfigNodeException {
 
   private static final String SCHEMA_REGION_GROUP = "SchemaRegionGroup";
   private static final String DATA_REGION_GROUP = "DataRegionGroup";
 
-  public NotAvailableRegionGroupException(TConsensusGroupType regionGroupType) {
+  public NoAvailableRegionGroupException(TConsensusGroupType regionGroupType) {
     super(
         String.format(
             "There are no available %s RegionGroups currently, please use \"show cluster\" or \"show regions\" to check the cluster status",
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterSchemaManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterSchemaManager.java
index af530d196c..174ba8eabb 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterSchemaManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ClusterSchemaManager.java
@@ -124,7 +124,7 @@ public class ClusterSchemaManager {
     } catch (MetadataException metadataException) {
       // Reject if StorageGroup already set
       if (metadataException instanceof IllegalPathException) {
-        result = new TSStatus(TSStatusCode.PATH_ILLEGAL.getStatusCode());
+        result = new TSStatus(TSStatusCode.ILLEGAL_PATH.getStatusCode());
       } else {
         result = new TSStatus(TSStatusCode.DATABASE_ALREADY_EXISTS.getStatusCode());
       }
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
index 9765997389..d4620d9c47 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConfigManager.java
@@ -737,7 +737,7 @@ public class ConfigManager implements IManager {
     final String errorSuffix = " is consistent with the Seed-ConfigNode.";
 
     ConfigNodeConfig conf = ConfigNodeDescriptor.getInstance().getConf();
-    TSStatus errorStatus = new TSStatus(TSStatusCode.ERROR_GLOBAL_CONFIG.getStatusCode());
+    TSStatus errorStatus = new TSStatus(TSStatusCode.CONFIGURATION_ERROR.getStatusCode());
     if (!req.getDataRegionConsensusProtocolClass()
         .equals(conf.getDataRegionConsensusProtocolClass())) {
       return errorStatus.setMessage(
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
index 446d745b20..3de783f000 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ConsensusManager.java
@@ -328,7 +328,7 @@ public class ConsensusManager {
     if (isLeader()) {
       return result.setCode(TSStatusCode.SUCCESS_STATUS.getStatusCode());
     } else {
-      result.setCode(TSStatusCode.NEED_REDIRECTION.getStatusCode());
+      result.setCode(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode());
       result.setMessage(
           "The current ConfigNode is not leader, please redirect to a new ConfigNode.");
 
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java
index 79ecc64828..9e42c753c0 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/ProcedureManager.java
@@ -501,7 +501,7 @@ public class ProcedureManager {
           executor.getResultOrProcedure(procedureId);
       if (!finishedProcedure.isFinished()) {
         // the procedure is still executing
-        statusList.add(RpcUtils.getStatus(TSStatusCode.STILL_EXECUTING_STATUS));
+        statusList.add(RpcUtils.getStatus(TSStatusCode.OVERLAP_WITH_EXISTING_TASK));
         isSucceed = false;
         continue;
       }
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManager.java
index ed8564617c..b16692e8db 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/LoadManager.java
@@ -37,7 +37,7 @@ import org.apache.iotdb.confignode.client.async.handlers.AsyncClientHandler;
 import org.apache.iotdb.confignode.conf.ConfigNodeConfig;
 import org.apache.iotdb.confignode.conf.ConfigNodeDescriptor;
 import org.apache.iotdb.confignode.consensus.request.write.region.CreateRegionGroupsPlan;
-import org.apache.iotdb.confignode.exception.NotAvailableRegionGroupException;
+import org.apache.iotdb.confignode.exception.NoAvailableRegionGroupException;
 import org.apache.iotdb.confignode.exception.NotEnoughDataNodeException;
 import org.apache.iotdb.confignode.exception.StorageGroupNotExistsException;
 import org.apache.iotdb.confignode.manager.ClusterSchemaManager;
@@ -123,7 +123,7 @@ public class LoadManager {
    */
   public Map<String, SchemaPartitionTable> allocateSchemaPartition(
       Map<String, List<TSeriesPartitionSlot>> unassignedSchemaPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     return partitionBalancer.allocateSchemaPartition(unassignedSchemaPartitionSlotsMap);
   }
 
@@ -136,7 +136,7 @@ public class LoadManager {
   public Map<String, DataPartitionTable> allocateDataPartition(
       Map<String, Map<TSeriesPartitionSlot, List<TTimePartitionSlot>>>
           unassignedDataPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     return partitionBalancer.allocateDataPartition(unassignedDataPartitionSlotsMap);
   }
 
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/PartitionBalancer.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/PartitionBalancer.java
index f51b0db187..72522e099b 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/PartitionBalancer.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/PartitionBalancer.java
@@ -22,7 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot;
 import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot;
 import org.apache.iotdb.commons.partition.DataPartitionTable;
 import org.apache.iotdb.commons.partition.SchemaPartitionTable;
-import org.apache.iotdb.confignode.exception.NotAvailableRegionGroupException;
+import org.apache.iotdb.confignode.exception.NoAvailableRegionGroupException;
 import org.apache.iotdb.confignode.manager.IManager;
 import org.apache.iotdb.confignode.manager.load.balancer.partition.GreedyPartitionAllocator;
 import org.apache.iotdb.confignode.manager.load.balancer.partition.IPartitionAllocator;
@@ -50,7 +50,7 @@ public class PartitionBalancer {
    */
   public Map<String, SchemaPartitionTable> allocateSchemaPartition(
       Map<String, List<TSeriesPartitionSlot>> unassignedSchemaPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     return genPartitionAllocator().allocateSchemaPartition(unassignedSchemaPartitionSlotsMap);
   }
 
@@ -63,7 +63,7 @@ public class PartitionBalancer {
   public Map<String, DataPartitionTable> allocateDataPartition(
       Map<String, Map<TSeriesPartitionSlot, List<TTimePartitionSlot>>>
           unassignedDataPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     return genPartitionAllocator().allocateDataPartition(unassignedDataPartitionSlotsMap);
   }
 
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/GreedyPartitionAllocator.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/GreedyPartitionAllocator.java
index 0e9290ec87..4f92c325dc 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/GreedyPartitionAllocator.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/GreedyPartitionAllocator.java
@@ -27,7 +27,7 @@ import org.apache.iotdb.commons.partition.SchemaPartitionTable;
 import org.apache.iotdb.commons.partition.SeriesPartitionTable;
 import org.apache.iotdb.confignode.conf.ConfigNodeConfig;
 import org.apache.iotdb.confignode.conf.ConfigNodeDescriptor;
-import org.apache.iotdb.confignode.exception.NotAvailableRegionGroupException;
+import org.apache.iotdb.confignode.exception.NoAvailableRegionGroupException;
 import org.apache.iotdb.confignode.manager.IManager;
 import org.apache.iotdb.confignode.manager.partition.PartitionManager;
 import org.apache.iotdb.tsfile.utils.Pair;
@@ -55,7 +55,7 @@ public class GreedyPartitionAllocator implements IPartitionAllocator {
   @Override
   public Map<String, SchemaPartitionTable> allocateSchemaPartition(
       Map<String, List<TSeriesPartitionSlot>> unassignedSchemaPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     Map<String, SchemaPartitionTable> result = new ConcurrentHashMap<>();
 
     for (Map.Entry<String, List<TSeriesPartitionSlot>> slotsMapEntry :
@@ -86,7 +86,7 @@ public class GreedyPartitionAllocator implements IPartitionAllocator {
   public Map<String, DataPartitionTable> allocateDataPartition(
       Map<String, Map<TSeriesPartitionSlot, List<TTimePartitionSlot>>>
           unassignedDataPartitionSlotsMap)
-      throws NotAvailableRegionGroupException {
+      throws NoAvailableRegionGroupException {
     Map<String, DataPartitionTable> result = new ConcurrentHashMap<>();
 
     for (Map.Entry<String, Map<TSeriesPartitionSlot, List<TTimePartitionSlot>>> slotsMapEntry :
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/IPartitionAllocator.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/IPartitionAllocator.java
index f957c0b8db..ec20638d3e 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/IPartitionAllocator.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/load/balancer/partition/IPartitionAllocator.java
@@ -22,7 +22,7 @@ import org.apache.iotdb.common.rpc.thrift.TSeriesPartitionSlot;
 import org.apache.iotdb.common.rpc.thrift.TTimePartitionSlot;
 import org.apache.iotdb.commons.partition.DataPartitionTable;
 import org.apache.iotdb.commons.partition.SchemaPartitionTable;
-import org.apache.iotdb.confignode.exception.NotAvailableRegionGroupException;
+import org.apache.iotdb.confignode.exception.NoAvailableRegionGroupException;
 
 import java.util.List;
 import java.util.Map;
@@ -41,7 +41,7 @@ public interface IPartitionAllocator {
    */
   Map<String, SchemaPartitionTable> allocateSchemaPartition(
       Map<String, List<TSeriesPartitionSlot>> unassignedSchemaPartitionSlotsMap)
-      throws NotAvailableRegionGroupException;
+      throws NoAvailableRegionGroupException;
 
   /**
    * Allocate DataPartitions
@@ -52,5 +52,5 @@ public interface IPartitionAllocator {
   Map<String, DataPartitionTable> allocateDataPartition(
       Map<String, Map<TSeriesPartitionSlot, List<TTimePartitionSlot>>>
           unassignedDataPartitionSlotsMap)
-      throws NotAvailableRegionGroupException;
+      throws NoAvailableRegionGroupException;
 }
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java
index 86e743437b..8238594756 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/node/NodeManager.java
@@ -290,7 +290,7 @@ public class NodeManager {
     if (configManager.transfer(removeDataNodePlan.getDataNodeLocations()).getCode()
         != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
       dataSet.setStatus(
-          new TSStatus(TSStatusCode.NODE_DELETE_ERROR.getStatusCode())
+          new TSStatus(TSStatusCode.REMOVE_DATANODE_ERROR.getStatusCode())
               .setMessage("Fail to do transfer of the DataNodes"));
       return dataSet;
     }
@@ -303,7 +303,7 @@ public class NodeManager {
       status = new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
       status.setMessage("Server accepted the request");
     } else {
-      status = new TSStatus(TSStatusCode.NODE_DELETE_ERROR.getStatusCode());
+      status = new TSStatus(TSStatusCode.REMOVE_DATANODE_ERROR.getStatusCode());
       status.setMessage("Server rejected the request, maybe requests are too many");
     }
     dataSet.setStatus(status);
@@ -612,7 +612,7 @@ public class NodeManager {
       return new TSStatus(TSStatusCode.REMOVE_CONFIGNODE_ERROR.getStatusCode())
           .setMessage("Remove ConfigNode failed because transfer ConfigNode leader failed.");
     }
-    return new TSStatus(TSStatusCode.NEED_REDIRECTION.getStatusCode())
+    return new TSStatus(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode())
         .setRedirectNode(newLeader.getInternalEndPoint())
         .setMessage(
             "The ConfigNode to be removed is leader, already transfer Leader to "
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java b/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
index 3be1411ff7..77651a9bad 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/manager/partition/PartitionManager.java
@@ -59,7 +59,7 @@ import org.apache.iotdb.confignode.consensus.response.GetTimeSlotListResp;
 import org.apache.iotdb.confignode.consensus.response.RegionInfoListResp;
 import org.apache.iotdb.confignode.consensus.response.SchemaNodeManagementResp;
 import org.apache.iotdb.confignode.consensus.response.SchemaPartitionResp;
-import org.apache.iotdb.confignode.exception.NotAvailableRegionGroupException;
+import org.apache.iotdb.confignode.exception.NoAvailableRegionGroupException;
 import org.apache.iotdb.confignode.exception.NotEnoughDataNodeException;
 import org.apache.iotdb.confignode.exception.StorageGroupNotExistsException;
 import org.apache.iotdb.confignode.manager.ClusterSchemaManager;
@@ -217,10 +217,10 @@ public class PartitionManager {
         try {
           assignedSchemaPartition =
               getLoadManager().allocateSchemaPartition(unassignedSchemaPartitionSlotsMap);
-        } catch (NotAvailableRegionGroupException e) {
+        } catch (NoAvailableRegionGroupException e) {
           LOGGER.error("Create SchemaPartition failed because: ", e);
           resp.setStatus(
-              new TSStatus(TSStatusCode.NOT_AVAILABLE_REGION_GROUP.getStatusCode())
+              new TSStatus(TSStatusCode.NO_AVAILABLE_REGION_GROUP.getStatusCode())
                   .setMessage(e.getMessage()));
           return resp;
         }
@@ -294,10 +294,10 @@ public class PartitionManager {
         try {
           assignedDataPartition =
               getLoadManager().allocateDataPartition(unassignedDataPartitionSlotsMap);
-        } catch (NotAvailableRegionGroupException e) {
+        } catch (NoAvailableRegionGroupException e) {
           LOGGER.error("Create DataPartition failed because: ", e);
           resp.setStatus(
-              new TSStatus(TSStatusCode.NOT_AVAILABLE_REGION_GROUP.getStatusCode())
+              new TSStatus(TSStatusCode.NO_AVAILABLE_REGION_GROUP.getStatusCode())
                   .setMessage(e.getMessage()));
           return resp;
         }
@@ -501,11 +501,11 @@ public class PartitionManager {
    * @param storageGroup StorageGroupName
    * @param type SchemaRegion or DataRegion
    * @return The specific StorageGroup's Regions that sorted by the number of allocated slots
-   * @throws NotAvailableRegionGroupException When all RegionGroups within the specified
-   *     StorageGroup are unavailable currently
+   * @throws NoAvailableRegionGroupException When all RegionGroups within the specified StorageGroup
+   *     are unavailable currently
    */
   public List<Pair<Long, TConsensusGroupId>> getSortedRegionGroupSlotsCounter(
-      String storageGroup, TConsensusGroupType type) throws NotAvailableRegionGroupException {
+      String storageGroup, TConsensusGroupType type) throws NoAvailableRegionGroupException {
     // Collect static data
     List<Pair<Long, TConsensusGroupId>> regionGroupSlotsCounter =
         partitionInfo.getRegionGroupSlotsCounter(storageGroup, type);
@@ -521,7 +521,7 @@ public class PartitionManager {
     }
 
     if (result.isEmpty()) {
-      throw new NotAvailableRegionGroupException(type);
+      throw new NoAvailableRegionGroupException(type);
     }
 
     result.sort(Comparator.comparingLong(Pair::getLeft));
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/persistence/AuthorInfo.java b/confignode/src/main/java/org/apache/iotdb/confignode/persistence/AuthorInfo.java
index e6d81fded9..53ca5368d3 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/persistence/AuthorInfo.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/persistence/AuthorInfo.java
@@ -126,7 +126,7 @@ public class AuthorInfo implements SnapshotProcessor {
         result = getUserPermissionInfo(username);
         result.setStatus(RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS));
       } catch (AuthException e) {
-        result.setStatus(RpcUtils.getStatus(TSStatusCode.EXECUTE_PERMISSION_ERROR, e.getMessage()));
+        result.setStatus(RpcUtils.getStatus(TSStatusCode.AUTHENTICATION_ERROR, e.getMessage()));
       }
     } else {
       result = AuthUtils.generateEmptyPermissionInfoResp();
@@ -210,7 +210,7 @@ public class AuthorInfo implements SnapshotProcessor {
           throw new AuthException("unknown type: " + authorPlan.getAuthorType());
       }
     } catch (AuthException e) {
-      return RpcUtils.getStatus(TSStatusCode.EXECUTE_PERMISSION_ERROR, e.getMessage());
+      return RpcUtils.getStatus(TSStatusCode.AUTHENTICATION_ERROR, e.getMessage());
     }
     return RpcUtils.getStatus(TSStatusCode.SUCCESS_STATUS);
   }
diff --git a/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java b/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
index 363c092d77..ba92491931 100644
--- a/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
+++ b/confignode/src/main/java/org/apache/iotdb/confignode/service/ConfigNode.java
@@ -260,10 +260,10 @@ public class ConfigNode implements ConfigNodeMBean {
         CONF.setConfigNodeId(resp.getConfigNodeId());
         configManager.initConsensusManager();
         return;
-      } else if (status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+      } else if (status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         targetConfigNode = status.getRedirectNode();
         LOGGER.info("ConfigNode need redirect to  {}.", targetConfigNode);
-      } else if (status.getCode() == TSStatusCode.ERROR_GLOBAL_CONFIG.getStatusCode()) {
+      } else if (status.getCode() == TSStatusCode.CONFIGURATION_ERROR.getStatusCode()) {
         LOGGER.error(status.getMessage());
         throw new StartupException("Configuration are not consistent!");
       } else if (status.getCode() == TSStatusCode.CONSENSUS_NOT_INITIALIZED.getStatusCode()) {
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensus.java b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensus.java
index 91d3134b55..fab6ed0057 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensus.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/MultiLeaderConsensus.java
@@ -159,7 +159,7 @@ public class MultiLeaderConsensus implements IConsensus {
 
     TSStatus status;
     if (impl.isReadOnly()) {
-      status = new TSStatus(TSStatusCode.READ_ONLY_SYSTEM.getStatusCode());
+      status = new TSStatus(TSStatusCode.SYSTEM_READ_ONLY.getStatusCode());
       status.setMessage("Fail to do non-query operations because system is read-only.");
     } else if (!impl.isActive()) {
       // TODO: (xingtanzjr) whether we need to define a new status to indicate the inactive status ?
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/client/DispatchLogHandler.java b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/client/DispatchLogHandler.java
index 81ee0c2ea4..468bbc1e27 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/client/DispatchLogHandler.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/client/DispatchLogHandler.java
@@ -79,7 +79,7 @@ public class DispatchLogHandler implements AsyncMethodCallback<TSyncLogRes> {
 
   private boolean needRetry(int statusCode) {
     return statusCode == TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()
-        || statusCode == TSStatusCode.READ_ONLY_SYSTEM.getStatusCode()
+        || statusCode == TSStatusCode.SYSTEM_READ_ONLY.getStatusCode()
         || statusCode == TSStatusCode.WRITE_PROCESS_REJECT.getStatusCode();
   }
 
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/service/MultiLeaderRPCServiceProcessor.java b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/service/MultiLeaderRPCServiceProcessor.java
index fc3bdf123b..744a1d1463 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/multileader/service/MultiLeaderRPCServiceProcessor.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/multileader/service/MultiLeaderRPCServiceProcessor.java
@@ -90,7 +90,7 @@ public class MultiLeaderRPCServiceProcessor implements MultiLeaderConsensusIServ
       if (impl.isReadOnly()) {
         String message = "fail to sync log because system is read-only.";
         logger.error(message);
-        TSStatus status = new TSStatus(TSStatusCode.READ_ONLY_SYSTEM.getStatusCode());
+        TSStatus status = new TSStatus(TSStatusCode.SYSTEM_READ_ONLY.getStatusCode());
         status.setMessage(message);
         resultHandler.onComplete(new TSyncLogRes(Collections.singletonList(status)));
         return;
diff --git a/consensus/src/main/java/org/apache/iotdb/consensus/simple/SimpleConsensus.java b/consensus/src/main/java/org/apache/iotdb/consensus/simple/SimpleConsensus.java
index beb5c21dae..0a112d1bbf 100644
--- a/consensus/src/main/java/org/apache/iotdb/consensus/simple/SimpleConsensus.java
+++ b/consensus/src/main/java/org/apache/iotdb/consensus/simple/SimpleConsensus.java
@@ -118,7 +118,7 @@ class SimpleConsensus implements IConsensus {
 
     TSStatus status;
     if (impl.isReadOnly()) {
-      status = new TSStatus(TSStatusCode.READ_ONLY_SYSTEM.getStatusCode());
+      status = new TSStatus(TSStatusCode.SYSTEM_READ_ONLY.getStatusCode());
       status.setMessage("Fail to do non-query operations because system is read-only.");
     } else {
       status = impl.write(request);
diff --git a/docs/UserGuide/API/Status-Codes.md b/docs/UserGuide/API/Status-Codes.md
index dca83e8474..439c230159 100644
--- a/docs/UserGuide/API/Status-Codes.md
+++ b/docs/UserGuide/API/Status-Codes.md
@@ -45,122 +45,119 @@ Here is a list of Status Code and related message:
 |Status Code|Status Type|Meanings|
 |:--|:---|:---|
 |200|SUCCESS_STATUS||
-|201|STILL_EXECUTING_STATUS||
-|203|INCOMPATIBLE_VERSION|Incompatible version|
-|298|NODE_DELETE_ERROR|Failed while deleting node|
-|299|ALIAS_ALREADY_EXIST|Alias already exists|
-|300|PATH_ALREADY_EXIST|Path already exists|
-|303|METADATA_ERROR|Meet error when dealing with metadata|
-|304|PATH_NOT_EXIST|Path does not exist|
-|305|OUT_OF_TTL|Insertion time is less than TTL time bound|
-|307|COMPACTION_ERROR|Meet error while merging|
-|308|SYSTEM_CHECK_ERROR|Meet error while system checking|
-|310|SYNC_CONNECTION_ERROR|Meet error while sync connecting|
-|311|DATABASE_PROCESS_ERROR|Database processor related error|
-|313|STORAGE_ENGINE_ERROR|Storage engine related error|
-|314|TSFILE_PROCESSOR_ERROR|TsFile processor related error|
-|315|PATH_ILLEGAL|Illegal path|
-|316|LOAD_FILE_ERROR|Meet error while loading file|
-|317|DATABASE_NOT_READY|The database is in recovery mode, not ready fore accepting read/write operation|
-|318|ILLEGAL_PARAMETER|Parameter is illegal|
-|319|ALIGNED_TIMESERIES_ERROR|Meet error in aligned timeseries|
-|320|DUPLICATED_TEMPLATE|Schema template is duplicated|
-|321|UNDEFINED_TEMPLATE|Schema template is not defined|
-|322|DATABASE_NOT_EXIST|Database does not exist|
-|323|CONTINUOUS_QUERY_ERROR|Continuous query error|
-|324|NO_TEMPLATE_ON_MNODE|No schema template on current MNode|
-|325|DIFFERENT_TEMPLATE|Template is not consistent|
-|326|TEMPLATE_IS_IN_USE|Template is in use|
-|327|TEMPLATE_INCOMPATIBLE|Template is not compatible|
-|328|SEGMENT_NOT_FOUND|Segment not found|
-|329|PAGE_OUT_OF_SPACE|No enough space on schema page|
-|330|RECORD_DUPLICATED|Record is duplicated|
-|331|SEGMENT_OUT_OF_SPACE|No enough space on schema segment|
-|332|SCHEMA_FILE_NOT_EXISTS|SchemaFile does not exist|
-|333|WRITE_AHEAD_LOG_ERROR|WAL error|
-|334|CREATE_PIPE_SINK_ERROR|Failed to create a PIPE sink|
-|335|PIPE_ERROR|PIPE error|
-|336|PIPESERVER_ERROR|PIPE server error|
-|337|SERIES_OVERFLOW|Series number exceeds the threshold|
-|340|CREATE_TEMPLATE_ERROR|Create schema template error|
-|341|SYNC_FILE_REDIRECTION_ERROR|Sync TsFile redirection error|
-|342|SYNC_FILE_ERROR|Sync TsFile error|
-|343|VERIFY_METADATA_ERROR|Meet error in validate timeseries schema|
-|344|TIMESERIES_IN_BLACK_LIST|Timeseries is being deleted|
-|349|OVERSIZE_RECORD|Size of record exceeds the threshold of page of SchemaFile|
-|350|SCHEMA_FILE_REDO_LOG_BROKEN|SchemaFile redo log has broken|
-|355|TRIGGER_FIRE_ERROR|Error when firing trigger|
-|360|TRIGGER_LOAD_CLASS_ERROR|Error when load class of trigger|
-|361|TRIGGER_DOWNLOAD_ERROR|Error when download trigger from ConfigNode|
-|362|CREATE_TRIGGER_INSTANCE_ERROR|Error when create trigger instance|
-|363|ACTIVE_TRIGGER_INSTANCE_ERROR|Error when activate trigger instance|
-|364|DROP_TRIGGER_INSTANCE_ERROR|Error when drop trigger instance|
-|365|UPDATE_TRIGGER_LOCATION_ERROR|Error when move stateful trigger to new datanode|
-|370|UDF_LOAD_CLASS_ERROR|Error when loading UDF class|
-|371|UDF_DOWNLOAD_ERROR|DataNode cannot download UDF from ConfigNode|
-|372|CREATE_FUNCTION_ON_DATANODE_ERROR|Error when create UDF on DataNode|
-|373|DROP_FUNCTION_ON_DATANODE_ERROR|Error when drop a UDF on DataNode|
-|400|EXECUTE_STATEMENT_ERROR|Execute statement error|
-|401|SQL_PARSE_ERROR|Meet error while parsing SQL|
-|402|GENERATE_TIME_ZONE_ERROR|Meet error while generating time zone|
-|403|SET_TIME_ZONE_ERROR|Meet error while setting time zone|
-|405|QUERY_NOT_ALLOWED|Query statements are not allowed error|
-|407|LOGICAL_OPERATOR_ERROR|Logical operator related error|
-|408|LOGICAL_OPTIMIZE_ERROR|Logical optimize related error|
-|409|UNSUPPORTED_FILL_TYPE|Unsupported fill type related error|
-|411|QUERY_PROCESS_ERROR|Query process related error|
-|412|WRITE_PROCESS_ERROR|Writing data related error|
-|413|WRITE_PROCESS_REJECT|Writing data rejected error|
-|416|SEMANTIC_ERROR|SQL semantic error|
-|417|LOAD_PIECE_OF_TSFILE_ERROR|Error when load a piece of TsFile when loading|
-|423|MEMORY_NOT_ENOUGH|Not enough memory for task execution in MPP|
-|500|INTERNAL_SERVER_ERROR|Internal server error|
-|501|CLOSE_OPERATION_ERROR|Meet error in close operation|
-|502|READ_ONLY_SYSTEM|Operating system is read only|
-|503|DISK_SPACE_INSUFFICIENT|Disk space is insufficient|
-|504|START_UP_ERROR|Meet error while starting up|
-|505|SHUT_DOWN_ERROR|Meet error while shutdown|
-|506|MULTIPLE_ERROR|Meet error when executing multiple statements|
-|508|TSBLOCK_SERIALIZE_ERROR|TsBlock serialization error|
-|600|WRONG_LOGIN_PASSWORD|Username or password is wrong|
-|601|NOT_LOGIN|Has not logged in|
-|602|NO_PERMISSION|No permissions for this operation, please add privilege|
-|603|UNINITIALIZED_AUTH_ERROR|Uninitialized authorizer|
-|605|USER_NOT_EXIST|User does not exist|
-|606|ROLE_NOT_EXIST|Role does not exist|
-|607|AUTHENTICATION_FAILED|Error in authentication|
-|608|CLEAR_PERMISSION_CACHE_ERROR|Error when clear the permission cache|
-|701|TIME_OUT|Operation timeout|
-|703|UNSUPPORTED_OPERATION|Unsupported operation|
-|706|NO_CONNECTION|Can not get connection error|
-|707|NEED_REDIRECTION|Need direction|
-|709|ALL_RETRY_ERROR|All retry failed|
-|710|MIGRATE_REGION_ERROR|Error when migrate region|
-|711|CREATE_REGION_ERROR|Create region error|
-|712|DELETE_REGION_ERROR|Delete region error|
-|713|PARTITION_CACHE_UPDATE_ERROR|Update partition cache failed|
-|714|DESERIALIZE_PIECE_OF_TSFILE_ERROR|Error when deserialize a piece of TsFile|
-|715|CONSENSUS_NOT_INITIALIZED|Consensus is not initialized and cannot provide service|
-|800|CONFIGURATION_ERROR|Configuration error|
-|901|DATANODE_ALREADY_REGISTERED|DataNode already registered in cluster|
-|903|DATABASE_ALREADY_EXISTS|Database already exist|
-|904|NO_ENOUGH_DATANODE|The number of DataNode is not enough, cannot remove DataNode or create enough replication|
-|905|ERROR_GLOBAL_CONFIG|Global config in cluster does not consistent|
-|906|ADD_CONFIGNODE_ERROR|Add ConfigNode error|
-|907|REMOVE_CONFIGNODE_ERROR|Remove ConfigNode error|
-|912|DATANODE_NOT_EXIST|DataNode not exist error|
-|917|DATANODE_STOP_ERROR|DataNode stop error|
-|918|REGION_LEADER_CHANGE_ERROR|Region leader migration failed|
-|919|REMOVE_DATANODE_ERROR|Remove datanode failed|
-|920|OVERLAP_WITH_EXISTING_TASK|Current task has some conflict with existing tasks|
-|921|NOT_AVAILABLE_REGION_GROUP|Cannot find an available region group|
-|922|CREATE_TRIGGER_ERROR|ConfigNode create trigger error|
-|923|DROP_TRIGGER_ERROR|ConfigNode delete Trigger error|
-|925|REGISTER_REMOVED_DATANODE|The DataNode to be registered is removed before|
-|930|NO_SUCH_CQ|CQ task does not exist|
-|931|CQ_ALREADY_ACTIVE|CQ is already active|
-|932|CQ_AlREADY_EXIST|CQ is already exist|
-|933|CQ_UPDATE_LAST_EXEC_TIME_ERROR|CQ update last execution time failed|
+|201|INCOMPATIBLE_VERSION|Incompatible version|
+|202|CONFIGURATION_ERROR|Configuration error|
+|203|START_UP_ERROR|Meet error while starting|
+|204|SHUT_DOWN_ERROR|Meet error while shutdown|
+|300|UNSUPPORTED_OPERATION|Unsupported operation|
+|301|EXECUTE_STATEMENT_ERROR|Execute statement error|
+|302|MULTIPLE_ERROR|Meet error when executing multiple statements|
+|303|ILLEGAL_PARAMETER|Parameter is illegal|
+|304|OVERLAP_WITH_EXISTING_TASK|Current task has some conflict with existing tasks|
+|305|INTERNAL_SERVER_ERROR|Internal server error|
+|400|REDIRECTION_RECOMMEND|Recommend Client redirection|
+|500|DATABASE_NOT_EXIST|Database does not exist|
+|501|DATABASE_ALREADY_EXISTS|Database already exist|
+|502|SERIES_OVERFLOW|Series number exceeds the threshold|
+|503|TIMESERIES_ALREADY_EXIST|Timeseries number exceeds the threshold|
+|504|TIMESERIES_IN_BLACK_LIST|Timeseries is being deleted|
+|505|ALIAS_ALREADY_EXIST|Alias already exists|
+|506|PATH_ALREADY_EXIST|Path already exists|
+|507|METADATA_ERROR|Meet error when dealing with metadata|
+|508|PATH_NOT_EXIST|Path does not exist|
+|509|ILLEGAL_PATH|Illegal path|
+|510|CREATE_TEMPLATE_ERROR|Create schema template error|
+|511|DUPLICATED_TEMPLATE|Schema template is duplicated|
+|512|UNDEFINED_TEMPLATE|Schema template is not defined|
+|513|TEMPLATE_NOT_SET|Schema template is not set|
+|514|DIFFERENT_TEMPLATE|Template is not consistent|
+|515|TEMPLATE_IS_IN_USE|Template is in use|
+|516|TEMPLATE_INCOMPATIBLE|Template is not compatible|
+|517|SEGMENT_NOT_FOUND|Segment not found|
+|518|PAGE_OUT_OF_SPACE|No enough space on schema page|
+|519|RECORD_DUPLICATED|Record is duplicated|
+|520|SEGMENT_OUT_OF_SPACE|No enough space on schema segment|
+|521|SCHEMA_FILE_NOT_EXISTS|SchemaFile does not exist|
+|522|OVERSIZE_RECORD|Size of record exceeds the threshold of page of SchemaFile|
+|523|SCHEMA_FILE_REDO_LOG_BROKEN|SchemaFile redo log has broken|
+|524|TEMPLATE_NOT_ACTIVATED|Schema template is not activated|
+|600|SYSTEM_READ_ONLY|IoTDB system is read only|
+|601|STORAGE_ENGINE_ERROR|Storage engine related error|
+|602|STORAGE_ENGINE_NOT_READY|The storage engine is in recovery, not ready fore accepting read/write operation|
+|603|DATAREGION_PROCESS_ERROR|DataRegion related error|
+|604|TSFILE_PROCESSOR_ERROR|TsFile processor related error|
+|605|WRITE_PROCESS_ERROR|Writing data related error|
+|606|WRITE_PROCESS_REJECT|Writing data rejected error|
+|607|OUT_OF_TTL|Insertion time is less than TTL time bound|
+|608|COMPACTION_ERROR|Meet error while merging|
+|609|ALIGNED_TIMESERIES_ERROR|Meet error in aligned timeseries|
+|610|WAL_ERROR|WAL error|
+|611|DISK_SPACE_INSUFFICIENT|Disk space is insufficient|
+|700|SQL_PARSE_ERROR|Meet error while parsing SQL|
+|701|SEMANTIC_ERROR|SQL semantic error|
+|702|GENERATE_TIME_ZONE_ERROR|Meet error while generating time zone|
+|703|SET_TIME_ZONE_ERROR|Meet error while setting time zone|
+|704|QUERY_NOT_ALLOWED|Query statements are not allowed error|
+|705|LOGICAL_OPERATOR_ERROR|Logical operator related error|
+|706|LOGICAL_OPTIMIZE_ERROR|Logical optimize related error|
+|707|UNSUPPORTED_FILL_TYPE|Unsupported fill type related error|
+|708|QUERY_PROCESS_ERROR|Query process related error|
+|709|MPP_MEMORY_NOT_ENOUGH|Not enough memory for task execution in MPP|
+|710|CLOSE_OPERATION_ERROR|Meet error in close operation|
+|711|TSBLOCK_SERIALIZE_ERROR|TsBlock serialization error|
+|712|INTERNAL_REQUEST_TIME_OUT|MPP Operation timeout|
+|713|INTERNAL_REQUEST_RETRY_ERROR|Internal operation retry failed|
+|800|AUTHENTICATION_ERROR|Error in authentication|
+|801|WRONG_LOGIN_PASSWORD|Username or password is wrong|
+|802|NOT_LOGIN|Has not logged in|
+|803|NO_PERMISSION|No permissions for this operation, please add privilege|
+|804|UNINITIALIZED_AUTH_ERROR|Uninitialized authorizer|
+|805|USER_NOT_EXIST|User does not exist|
+|806|ROLE_NOT_EXIST|Role does not exist|
+|807|CLEAR_PERMISSION_CACHE_ERROR|Error when clear the permission cache|
+|900|MIGRATE_REGION_ERROR|Error when migrate region|
+|901|CREATE_REGION_ERROR|Create region error|
+|902|DELETE_REGION_ERROR|Delete region error|
+|903|PARTITION_CACHE_UPDATE_ERROR|Update partition cache failed|
+|904|CONSENSUS_NOT_INITIALIZED|Consensus is not initialized and cannot provide service|
+|905|REGION_LEADER_CHANGE_ERROR|Region leader migration failed|
+|906|NO_AVAILABLE_REGION_GROUP|Cannot find an available region group|
+|1000|DATANODE_ALREADY_REGISTERED|DataNode already registered in cluster|
+|1001|NO_ENOUGH_DATANODE|The number of DataNode is not enough, cannot remove DataNode or create enough replication|
+|1002|ADD_CONFIGNODE_ERROR|Add ConfigNode error|
+|1003|REMOVE_CONFIGNODE_ERROR|Remove ConfigNode error|
+|1004|DATANODE_NOT_EXIST|DataNode not exist error|
+|1005|DATANODE_STOP_ERROR|DataNode stop error|
+|1006|REMOVE_DATANODE_ERROR|Remove datanode failed|
+|1007|REGISTER_REMOVED_DATANODE|The DataNode to be registered is removed before|
+|1008|CAN_NOT_CONNECT_DATANODE|Can not connect to DataNode|
+|1100|LOAD_FILE_ERROR|Meet error while loading file|
+|1101|LOAD_PIECE_OF_TSFILE_ERROR|Error when load a piece of TsFile when loading|
+|1102|DESERIALIZE_PIECE_OF_TSFILE_ERROR|Error when deserialize a piece of TsFile|
+|1103|CREATE_PIPE_SINK_ERROR|Failed to create a PIPE sink|
+|1104|PIPE_ERROR|PIPE error|
+|1105|PIPESERVER_ERROR|PIPE server error|
+|1106|SYNC_CONNECTION_ERROR|Meet error while sync connecting|
+|1107|SYNC_FILE_REDIRECTION_ERROR|Sync TsFile redirection error|
+|1108|SYNC_FILE_ERROR|Sync TsFile error|
+|1109|VERIFY_METADATA_ERROR|Meet error in validate timeseries schema|
+|1200|UDF_LOAD_CLASS_ERROR|Error when loading UDF class|
+|1201|UDF_DOWNLOAD_ERROR|DataNode cannot download UDF from ConfigNode|
+|1202|CREATE_UDF_ON_DATANODE_ERROR|Error when create UDF on DataNode|
+|1203|DROP_UDF_ON_DATANODE_ERROR|Error when drop a UDF on DataNode|
+|1300|CREATE_TRIGGER_ERROR|ConfigNode create trigger error|
+|1301|DROP_TRIGGER_ERROR|ConfigNode delete Trigger error|
+|1302|TRIGGER_FIRE_ERROR|Error when firing trigger|
+|1303|TRIGGER_LOAD_CLASS_ERROR|Error when load class of trigger|
+|1304|TRIGGER_DOWNLOAD_ERROR|Error when download trigger from ConfigNode|
+|1305|CREATE_TRIGGER_INSTANCE_ERROR|Error when create trigger instance|
+|1306|ACTIVE_TRIGGER_INSTANCE_ERROR|Error when activate trigger instance|
+|1307|DROP_TRIGGER_INSTANCE_ERROR|Error when drop trigger instance|
+|1308|UPDATE_TRIGGER_LOCATION_ERROR|Error when move stateful trigger to new datanode|
+|1400|NO_SUCH_CQ|CQ task does not exist|
+|1401|CQ_ALREADY_ACTIVE|CQ is already active|
+|1402|CQ_AlREADY_EXIST|CQ is already exist|
+|1403|CQ_UPDATE_LAST_EXEC_TIME_ERROR|CQ update last execution time failed|
 
 > All exceptions are refactored in the latest version by extracting uniform message into exception classes. Different error codes are added to all exceptions. When an exception is caught and a higher-level exception is thrown, the error code will keep and pass so that users will know the detailed error reason.
 A base exception class "ProcessException" is also added to be extended by all exceptions.
diff --git a/docs/zh/UserGuide/API/Status-Codes.md b/docs/zh/UserGuide/API/Status-Codes.md
index 95f07324dd..eab57eb067 100644
--- a/docs/zh/UserGuide/API/Status-Codes.md
+++ b/docs/zh/UserGuide/API/Status-Codes.md
@@ -46,124 +46,119 @@ try {
 |状态码|状态类型|状态信息|
 |:--|:---|:---|
 |200|SUCCESS_STATUS|成功状态|
-|201|STILL_EXECUTING_STATUS|仍在执行状态|
-|203|INCOMPATIBLE_VERSION|版本不兼容|
-|298|NODE_DELETE_ERROR|删除节点失败|
-|299|ALIAS_ALREADY_EXIST|路径别名已经存在|
-|300|PATH_ALREADY_EXIST|路径已经存在|
-|303|METADATA_ERROR|处理元数据错误|
-|304|PATH_NOT_EXIST|路径不存在|
-|305|OUT_OF_TTL|插入时间少于 TTL 时间边界|
-|307|COMPACTION_ERROR|合并错误|
-|308|SYSTEM_CHECK_ERROR|系统检查错误|
-|310|SYNC_CONNECTION_ERROR|回传连接错误|
-|311|DATABASE_PROCESS_ERROR|存储组处理器相关错误|
-|313|STORAGE_ENGINE_ERROR|存储引擎相关错误|
-|314|TSFILE_PROCESSOR_ERROR|TsFile 处理器相关错误|
-|315|PATH_ILLEGAL|路径不合法|
-|316|LOAD_FILE_ERROR|加载文件错误|
-|317|DATABASE_NOT_READY|Database 还在恢复中,还不能接受读写操作|
-|318|ILLEGAL_PARAMETER|参数错误|
-|319|ALIGNED_TIMESERIES_ERROR|对齐时间序列错误|
-|320|DUPLICATED_TEMPLATE|元数据模板重复|
-|321|UNDEFINED_TEMPLATE|元数据模板未定义|
-|322|DATABASE_NOT_EXIST|数据库不存在|
-|323|CONTINUOUS_QUERY_ERROR|连续查询功能错误|
-|324|NO_TEMPLATE_ON_MNODE|当前元数据节点不存在元数据模板|
-|325|DIFFERENT_TEMPLATE|元数据模板不一致|
-|326|TEMPLATE_IS_IN_USE|元数据模板正在使用|
-|327|TEMPLATE_INCOMPATIBLE|元数据模板不兼容|
-|328|SEGMENT_NOT_FOUND|未找到 Segment|
-|329|PAGE_OUT_OF_SPACE|SchemaFile 中 Page 空间不够|
-|330|RECORD_DUPLICATED|记录重复|
-|331|SEGMENT_OUT_OF_SPACE|SchemaFile 中 segment 空间不够|
-|332|SCHEMA_FILE_NOT_EXISTS|SchemaFile 不存在|
-|333|WRITE_AHEAD_LOG_ERROR|WAL 异常|
-|334|CREATE_PIPE_SINK_ERROR|创建 PIPE Sink 失败|
-|335|PIPE_ERROR|PIPE 异常|
-|336|PIPESERVER_ERROR|PIPE server 异常|
-|337|SERIES_OVERFLOW|序列数量超过阈值|
-|338|MEASUREMENT_ALREADY_EXIST|序列数量超过阈值|
-|340|CREATE_TEMPLATE_ERROR|创建物理量模板失败|
-|341|SYNC_FILE_REDIRECTION_ERROR|同步文件时重定向异常|
-|342|SYNC_FILE_ERROR|同步文件异常|
-|343|VERIFY_METADATA_ERROR|校验元数据失败|
-|344|TIMESERIES_IN_BLACK_LIST|时间序列正在删除|
-|349|OVERSIZE_RECORD|记录大小超过元数据文件页面大小|
-|350|SCHEMA_FILE_REDO_LOG_BROKEN|SchemaFile 的 redo 日志损坏|
-|355|TRIGGER_FIRE_ERROR|触发器执行错误|
-|360|TRIGGER_LOAD_CLASS_ERROR|触发器加载类异常|
-|361|TRIGGER_DOWNLOAD_ERROR|从 ConfigNode 下载触发器异常|
-|362|CREATE_TRIGGER_INSTANCE_ERROR|创建触发器实例异常|
-|363|ACTIVE_TRIGGER_INSTANCE_ERROR|激活触发器实例异常|
-|364|DROP_TRIGGER_INSTANCE_ERROR|删除触发器实例异常|
-|365|UPDATE_TRIGGER_LOCATION_ERROR|更新有状态的触发器所在 DataNode 异常|
-|370|UDF_LOAD_CLASS_ERROR|UDF 加载类异常|
-|371|UDF_DOWNLOAD_ERROR|无法从 ConfigNode 下载 UDF|
-|372|CREATE_FUNCTION_ON_DATANODE_ERROR|在 DataNode 创建 UDF 失败|
-|373|DROP_FUNCTION_ON_DATANODE_ERROR|在 DataNode 卸载 UDF 失败|
-|400|EXECUTE_STATEMENT_ERROR|执行语句错误|
-|401|SQL_PARSE_ERROR|SQL 语句分析错误|
-|402|GENERATE_TIME_ZONE_ERROR|生成时区错误|
-|403|SET_TIME_ZONE_ERROR|设置时区错误|
-|405|QUERY_NOT_ALLOWED|查询语句不允许|
-|407|LOGICAL_OPERATOR_ERROR|逻辑符相关错误|
-|408|LOGICAL_OPTIMIZE_ERROR|逻辑优化相关错误|
-|409|UNSUPPORTED_FILL_TYPE|不支持的填充类型|
-|411|QUERY_PROCESS_ERROR|查询处理相关错误|
-|412|WRITE_PROCESS_ERROR|写入相关错误|
-|413|WRITE_PROCESS_REJECT|写入拒绝错误|
-|416|SEMANTIC_ERROR|SQL 语义错误|
-|417|LOAD_PIECE_OF_TSFILE_ERROR|加载 TsFile 片段异常|
-|423|MEMORY_NOT_ENOUGH|MPP 框架中任务执行内存不足|
-|500|INTERNAL_SERVER_ERROR|服务器内部错误|
-|501|CLOSE_OPERATION_ERROR|关闭操作错误|
-|502|READ_ONLY_SYSTEM|系统只读|
-|503|DISK_SPACE_INSUFFICIENT|磁盘空间不足|
-|504|START_UP_ERROR|启动错误|
-|505|SHUT_DOWN_ERROR|关机错误|
-|506|MULTIPLE_ERROR|多行语句执行错误|
-|508|TSBLOCK_SERIALIZE_ERROR|TsBlock 序列化错误|
-|600|WRONG_LOGIN_PASSWORD|用户名或密码错误|
-|601|NOT_LOGIN|没有登录|
-|602|NO_PERMISSION|没有操作权限|
-|603|UNINITIALIZED_AUTH_ERROR|授权人未初始化|
-|604|EXECUTE_PERMISSION_EXCEPTION_ERROR||
-|605|USER_NOT_EXIST|用户不存在|
-|606|ROLE_NOT_EXIST|角色不存在|
-|607|AUTHENTICATION_FAILED|权限认证失败|
-|608|CLEAR_PERMISSION_CACHE_ERROR|清空权限缓存失败|
-|701|TIME_OUT|操作超时|
-|703|UNSUPPORTED_OPERATION|不支持的操作|
-|706|NO_CONNECTION|连接获取失败|
-|707|NEED_REDIRECTION|需要重定向|
-|709|ALL_RETRY_ERROR|所有重试失败|
-|710|MIGRATE_REGION_ERROR|Region 迁移失败|
-|711|CREATE_REGION_ERROR|创建 region 失败|
-|712|DELETE_REGION_ERROR|删除 region 失败|
-|713|PARTITION_CACHE_UPDATE_ERROR|更新分区缓存失败|
-|714|DESERIALIZE_PIECE_OF_TSFILE_ERROR|反序列化 TsFile 片段异常|
-|715|CONSENSUS_NOT_INITIALIZED|共识层未初始化,不能提供服务|
-|800|CONFIGURATION_ERROR|配置文件有错误项|
-|901|DATANODE_ALREADY_REGISTERED|DataNode 在集群中已经注册|
-|903|DATABASE_ALREADY_EXISTS|Database 已存在|
-|904|NO_ENOUGH_DATANODE|DataNode 数量不足,无法移除节点或创建副本|
-|905|ERROR_GLOBAL_CONFIG|全局配置参数异常|
-|906|ADD_CONFIGNODE_ERROR|新增 ConfigNode 失败|
-|907|REMOVE_CONFIGNODE_ERROR|移除 ConfigNode 失败|
-|912|DATANODE_NOT_EXIST|此 DataNode 不存在|
-|917|DATANODE_STOP_ERROR|DataNode 关闭失败|
-|918|REGION_LEADER_CHANGE_ERROR|Region leader 迁移失败|
-|919|REMOVE_DATANODE_ERROR|移除 datanode 失败|
-|920|OVERLAP_WITH_EXISTING_TASK|与正在执行的其他操作冲突|
-|921|NOT_AVAILABLE_REGION_GROUP|无法找到可用的 Region 副本组|
-|922|CREATE_TRIGGER_ERROR|ConfigNode 创建 Trigger 失败|
-|923|DROP_TRIGGER_ERROR|ConfigNode 删除 Trigger 失败|
-|925|REGISTER_REMOVED_DATANODE|注册的 DataNode 已经被移除|
-|930|NO_SUCH_CQ|CQ 任务不存在|
-|931|CQ_ALREADY_ACTIVE|CQ 任务已激活|
-|932|CQ_AlREADY_EXIST|CQ 任务已存在|
-|933|CQ_UPDATE_LAST_EXEC_TIME_ERROR|CQ 更新上一次执行时间失败|
+|201|INCOMPATIBLE_VERSION|版本不兼容|
+|202|CONFIGURATION_ERROR|配置文件有错误项|
+|203|START_UP_ERROR|启动错误|
+|204|SHUT_DOWN_ERROR|关机错误|
+|300|UNSUPPORTED_OPERATION|不支持的操作|
+|301|EXECUTE_STATEMENT_ERROR|执行语句错误|
+|302|MULTIPLE_ERROR|多行语句执行错误|
+|303|ILLEGAL_PARAMETER|参数错误|
+|304|OVERLAP_WITH_EXISTING_TASK|与正在执行的其他操作冲突|
+|305|INTERNAL_SERVER_ERROR|服务器内部错误|
+|400|REDIRECTION_RECOMMEND|推荐客户端重定向|
+|500|DATABASE_NOT_EXIST|数据库不存在|
+|501|DATABASE_ALREADY_EXISTS|数据库已存在|
+|502|SERIES_OVERFLOW|序列数量超过阈值|
+|503|TIMESERIES_ALREADY_EXIST|序列数量超过阈值|
+|504|TIMESERIES_IN_BLACK_LIST|时间序列正在删除|
+|505|ALIAS_ALREADY_EXIST|路径别名已经存在|
+|506|PATH_ALREADY_EXIST|路径已经存在|
+|507|METADATA_ERROR|处理元数据错误|
+|508|PATH_NOT_EXIST|路径不存在|
+|509|ILLEGAL_PATH|路径不合法|
+|510|CREATE_TEMPLATE_ERROR|创建物理量模板失败|
+|511|DUPLICATED_TEMPLATE|元数据模板重复|
+|512|UNDEFINED_TEMPLATE|元数据模板未定义|
+|513|TEMPLATE_NOT_SET|元数据模板未设置|
+|514|DIFFERENT_TEMPLATE|元数据模板不一致|
+|515|TEMPLATE_IS_IN_USE|元数据模板正在使用|
+|516|TEMPLATE_INCOMPATIBLE|元数据模板不兼容|
+|517|SEGMENT_NOT_FOUND|未找到 Segment|
+|518|PAGE_OUT_OF_SPACE|SchemaFile 中 Page 空间不够|
+|519|RECORD_DUPLICATED|记录重复|
+|520|SEGMENT_OUT_OF_SPACE|SchemaFile 中 segment 空间不够|
+|521|SCHEMA_FILE_NOT_EXISTS|SchemaFile 不存在|
+|522|OVERSIZE_RECORD|记录大小超过元数据文件页面大小|
+|523|SCHEMA_FILE_REDO_LOG_BROKEN|SchemaFile 的 redo 日志损坏|
+|524|TEMPLATE_NOT_ACTIVATED|元数据模板未激活|
+|600|SYSTEM_READ_ONLY|IoTDB 系统只读|
+|601|STORAGE_ENGINE_ERROR|存储引擎相关错误|
+|602|STORAGE_ENGINE_NOT_READY|存储引擎还在恢复中,还不能接受读写操作|
+|603|DATAREGION_PROCESS_ERROR|DataRegion 相关错误|
+|604|TSFILE_PROCESSOR_ERROR|TsFile 处理器相关错误|
+|605|WRITE_PROCESS_ERROR|写入相关错误|
+|606|WRITE_PROCESS_REJECT|写入拒绝错误|
+|607|OUT_OF_TTL|插入时间少于 TTL 时间边界|
+|608|COMPACTION_ERROR|合并错误|
+|609|ALIGNED_TIMESERIES_ERROR|对齐时间序列错误|
+|610|WAL_ERROR|WAL 异常|
+|611|DISK_SPACE_INSUFFICIENT|磁盘空间不足|
+|700|SQL_PARSE_ERROR|SQL 语句分析错误|
+|701|SEMANTIC_ERROR|SQL 语义错误|
+|702|GENERATE_TIME_ZONE_ERROR|生成时区错误|
+|703|SET_TIME_ZONE_ERROR|设置时区错误|
+|704|QUERY_NOT_ALLOWED|查询语句不允许|
+|705|LOGICAL_OPERATOR_ERROR|逻辑符相关错误|
+|706|LOGICAL_OPTIMIZE_ERROR|逻辑优化相关错误|
+|707|UNSUPPORTED_FILL_TYPE|不支持的填充类型|
+|708|QUERY_PROCESS_ERROR|查询处理相关错误|
+|709|MPP_MEMORY_NOT_ENOUGH|MPP 框架中任务执行内存不足|
+|710|CLOSE_OPERATION_ERROR|关闭操作错误|
+|711|TSBLOCK_SERIALIZE_ERROR|TsBlock 序列化错误|
+|712|INTERNAL_REQUEST_TIME_OUT|MPP 操作超时|
+|713|INTERNAL_REQUEST_RETRY_ERROR|内部操作重试失败|
+|800|AUTHENTICATION_ERROR|权限认证失败|
+|801|WRONG_LOGIN_PASSWORD|用户名或密码错误|
+|802|NOT_LOGIN|没有登录|
+|803|NO_PERMISSION|没有操作权限|
+|804|UNINITIALIZED_AUTH_ERROR|授权人未初始化|
+|805|USER_NOT_EXIST|用户不存在|
+|806|ROLE_NOT_EXIST|角色不存在|
+|807|CLEAR_PERMISSION_CACHE_ERROR|清空权限缓存失败|
+|900|MIGRATE_REGION_ERROR|Region 迁移失败|
+|901|CREATE_REGION_ERROR|创建 region 失败|
+|902|DELETE_REGION_ERROR|删除 region 失败|
+|903|PARTITION_CACHE_UPDATE_ERROR|更新分区缓存失败|
+|904|CONSENSUS_NOT_INITIALIZED|共识层未初始化,不能提供服务|
+|905|REGION_LEADER_CHANGE_ERROR|Region leader 迁移失败|
+|906|NO_AVAILABLE_REGION_GROUP|无法找到可用的 Region 副本组|
+|1000|DATANODE_ALREADY_REGISTERED|DataNode 在集群中已经注册|
+|1001|NO_ENOUGH_DATANODE|DataNode 数量不足,无法移除节点或创建副本|
+|1002|ADD_CONFIGNODE_ERROR|新增 ConfigNode 失败|
+|1003|REMOVE_CONFIGNODE_ERROR|移除 ConfigNode 失败|
+|1004|DATANODE_NOT_EXIST|此 DataNode 不存在|
+|1005|DATANODE_STOP_ERROR|DataNode 关闭失败|
+|1006|REMOVE_DATANODE_ERROR|移除 datanode 失败|
+|1007|REGISTER_REMOVED_DATANODE|注册的 DataNode 已经被移除|
+|1008|CAN_NOT_CONNECT_DATANODE|连接 DataNode 失败|
+|1100|LOAD_FILE_ERROR|加载文件错误|
+|1101|LOAD_PIECE_OF_TSFILE_ERROR|加载 TsFile 片段异常|
+|1102|DESERIALIZE_PIECE_OF_TSFILE_ERROR|反序列化 TsFile 片段异常|
+|1103|SYNC_CONNECTION_ERROR|回传连接错误|
+|1104|SYNC_FILE_REDIRECTION_ERROR|同步文件时重定向异常|
+|1105|SYNC_FILE_ERROR|同步文件异常|
+|1106|CREATE_PIPE_SINK_ERROR|创建 PIPE Sink 失败|
+|1107|PIPE_ERROR|PIPE 异常|
+|1108|PIPESERVER_ERROR|PIPE server 异常|
+|1109|VERIFY_METADATA_ERROR|校验元数据失败|
+|1200|UDF_LOAD_CLASS_ERROR|UDF 加载类异常|
+|1201|UDF_DOWNLOAD_ERROR|无法从 ConfigNode 下载 UDF|
+|1202|CREATE_UDF_ON_DATANODE_ERROR|在 DataNode 创建 UDF 失败|
+|1203|DROP_UDF_ON_DATANODE_ERROR|在 DataNode 卸载 UDF 失败|
+|1300|CREATE_TRIGGER_ERROR|ConfigNode 创建 Trigger 失败|
+|1301|DROP_TRIGGER_ERROR|ConfigNode 删除 Trigger 失败|
+|1302|TRIGGER_FIRE_ERROR|触发器执行错误|
+|1303|TRIGGER_LOAD_CLASS_ERROR|触发器加载类异常|
+|1304|TRIGGER_DOWNLOAD_ERROR|从 ConfigNode 下载触发器异常|
+|1305|CREATE_TRIGGER_INSTANCE_ERROR|创建触发器实例异常|
+|1306|ACTIVE_TRIGGER_INSTANCE_ERROR|激活触发器实例异常|
+|1307|DROP_TRIGGER_INSTANCE_ERROR|删除触发器实例异常|
+|1308|UPDATE_TRIGGER_LOCATION_ERROR|更新有状态的触发器所在 DataNode 异常|
+|1400|NO_SUCH_CQ|CQ 任务不存在|
+|1401|CQ_ALREADY_ACTIVE|CQ 任务已激活|
+|1402|CQ_AlREADY_EXIST|CQ 任务已存在|
+|1403|CQ_UPDATE_LAST_EXEC_TIME_ERROR|CQ 更新上一次执行时间失败|
 
 > 在最新版本中,我们重构了 IoTDB 的异常类。通过将错误信息统一提取到异常类中,并为所有异常添加不同的错误代码,从而当捕获到异常并引发更高级别的异常时,错误代码将保留并传递,以便用户了解详细的错误原因。
 除此之外,我们添加了一个基础异常类“ProcessException”,由所有异常扩展。
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDeletionIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDeletionIT.java
index e319f4c089..789eedab1a 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDeletionIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBDeletionIT.java
@@ -24,6 +24,7 @@ import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
 import org.apache.iotdb.itbase.category.LocalStandaloneIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -97,7 +98,8 @@ public class IoTDBDeletionIT {
       statement.execute("insert into root.vehicle.d0(time,s4) values (10,true)");
 
       String errorMsg =
-          "416: For delete statement, where clause can only contain time expressions, value filter is not currently supported.";
+          TSStatusCode.SEMANTIC_ERROR.getStatusCode()
+              + ": For delete statement, where clause can only contain time expressions, value filter is not currently supported.";
 
       try {
         statement.execute("DELETE FROM root.vehicle.d0.s0  WHERE s0 <= 300 AND s0 > 0");
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBEncodingIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBEncodingIT.java
index 3a70f0e212..ff1452c953 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBEncodingIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBEncodingIT.java
@@ -22,6 +22,7 @@ package org.apache.iotdb.db.it;
 import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.LocalStandaloneIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Before;
@@ -59,7 +60,7 @@ public class IoTDBEncodingIT {
       statement.execute("CREATE TIMESERIES root.test1.s0 WITH DATATYPE=INT64,ENCODING=REGULAR");
       fail();
     } catch (SQLException e) {
-      assertEquals(303, e.getErrorCode());
+      assertEquals(TSStatusCode.METADATA_ERROR.getStatusCode(), e.getErrorCode());
     }
   }
 
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBPartialInsertionIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBPartialInsertionIT.java
index 747ae4958a..d98c60b577 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBPartialInsertionIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBPartialInsertionIT.java
@@ -23,6 +23,7 @@ import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
 import org.apache.iotdb.itbase.category.LocalStandaloneIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Before;
@@ -71,7 +72,11 @@ public class IoTDBPartialInsertionIT {
         statement.execute("INSERT INTO root.sg1(timestamp, s0) VALUES (1, 1)");
         fail();
       } catch (SQLException e) {
-        assertTrue(e.getMessage().contains("304: Path [root.sg1.s0] does not exist"));
+        assertTrue(
+            e.getMessage()
+                .contains(
+                    TSStatusCode.PATH_NOT_EXIST.getStatusCode()
+                        + ": Path [root.sg1.s0] does not exist"));
       }
     }
   }
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSimpleQueryIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSimpleQueryIT.java
index ad97973d82..4cafcb277a 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSimpleQueryIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSimpleQueryIT.java
@@ -23,6 +23,7 @@ import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
 import org.apache.iotdb.itbase.category.LocalStandaloneIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -91,7 +92,8 @@ public class IoTDBSimpleQueryIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "318: SDT compression deviation cannot be negative. Failed to create timeseries for path root.sg1.d0.s1",
+            TSStatusCode.ILLEGAL_PARAMETER.getStatusCode()
+                + ": SDT compression deviation cannot be negative. Failed to create timeseries for path root.sg1.d0.s1",
             e.getMessage());
       }
 
@@ -927,7 +929,10 @@ public class IoTDBSimpleQueryIT {
             "CREATE TIMESERIES root.sg1.d1.s1 with datatype=BOOLEAN, encoding=TS_2DIFF");
         fail();
       } catch (Exception e) {
-        Assert.assertEquals("303: encoding TS_2DIFF does not support BOOLEAN", e.getMessage());
+        Assert.assertEquals(
+            TSStatusCode.METADATA_ERROR.getStatusCode()
+                + ": encoding TS_2DIFF does not support BOOLEAN",
+            e.getMessage());
       }
 
       try {
@@ -935,14 +940,20 @@ public class IoTDBSimpleQueryIT {
             "CREATE TIMESERIES root.sg1.d1.s3 with datatype=DOUBLE, encoding=REGULAR");
         fail();
       } catch (Exception e) {
-        Assert.assertEquals("303: encoding REGULAR does not support DOUBLE", e.getMessage());
+        Assert.assertEquals(
+            TSStatusCode.METADATA_ERROR.getStatusCode()
+                + ": encoding REGULAR does not support DOUBLE",
+            e.getMessage());
       }
 
       try {
         statement.execute("CREATE TIMESERIES root.sg1.d1.s4 with datatype=TEXT, encoding=TS_2DIFF");
         fail();
       } catch (Exception e) {
-        Assert.assertEquals("303: encoding TS_2DIFF does not support TEXT", e.getMessage());
+        Assert.assertEquals(
+            TSStatusCode.METADATA_ERROR.getStatusCode()
+                + ": encoding TS_2DIFF does not support TEXT",
+            e.getMessage());
       }
 
     } catch (SQLException e) {
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSyntaxConventionStringLiteralIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSyntaxConventionStringLiteralIT.java
index 352c45ee58..a206201bd4 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSyntaxConventionStringLiteralIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBSyntaxConventionStringLiteralIT.java
@@ -25,6 +25,7 @@ import org.apache.iotdb.itbase.category.ClusterIT;
 import org.apache.iotdb.itbase.category.LocalStandaloneIT;
 import org.apache.iotdb.itbase.constant.BuiltinTimeSeriesGeneratingFunctionEnum;
 import org.apache.iotdb.itbase.constant.TestConstant;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -175,7 +176,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
   @Test
   public void testStringLiteralIllegalCase() {
     String errorMsg =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:45 no viable alternative at input '(1, string'";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -193,7 +195,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
     }
 
     String errorMsg1 =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:45 no viable alternative at input '(1, `string`'";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -205,7 +208,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
     }
 
     String errorMsg2 =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:53 token recognition error at: '')'";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -217,7 +221,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
     }
 
     String errorMsg3 =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:53 token recognition error at: '\")'";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -236,7 +241,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
   @Test
   public void testIllegalFilePath() {
     String errorMsg =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:5 no viable alternative at input 'LOAD path'";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -247,7 +253,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
     }
 
     String errorMsg1 =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:7 mismatched input 'path' expecting STRING_LITERAL";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -258,7 +265,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
     }
 
     String errorMsg2 =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:7 mismatched input 'path' expecting {ROOT, STRING_LITERAL}";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -272,7 +280,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
   @Test
   public void testUserPassword() {
     String errorMsg =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:18 mismatched input 'test' expecting STRING_LITERAL";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -285,7 +294,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
     }
 
     String errorMsg1 =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:17 mismatched input '`test`' expecting STRING_LITERAL";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -301,7 +311,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
   @Test
   public void testUDFClassName() {
     String errorMsg =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:23 mismatched input 'org' expecting STRING_LITERAL";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -336,7 +347,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
 
     // Illegal name with back quote
     String errorMsg1 =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:23 mismatched input '`org.apache.iotdb.db.query.udf.example.Adder`' "
             + "expecting STRING_LITERAL";
     try (Connection connection = EnvFactory.getEnv().getConnection();
@@ -368,7 +380,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
 
     // Illegal attribute
     String errorMsg =
-        "401: Error occurred while parsing SQL to physical plan: "
+        TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+            + ": Error occurred while parsing SQL to physical plan: "
             + "line 1:21 extraneous input 'k' expecting {',', ')'}";
     try (Connection connection = EnvFactory.getEnv().getConnection();
         Statement statement = connection.createStatement()) {
@@ -577,7 +590,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
   //  @Test
   //  public void testTriggerClassName() {
   //    String errorMsg =
-  //        "401: Error occurred while parsing SQL to physical plan: "
+  //        TSStatusCode.SQL_PARSE_ERROR.getStatusCode() + ": Error occurred while parsing SQL to
+  // physical plan: "
   //            + "line 1:64 mismatched input 'org' expecting {AS, '.'}";
   //    try (Connection connection = EnvFactory.getEnv().getConnection();
   //        Statement statement = connection.createStatement()) {
@@ -620,7 +634,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
   //  @Test
   //  public void testTriggerClassName1() {
   //    String errorMsg =
-  //        "401: Error occurred while parsing SQL to physical plan: "
+  //        TSStatusCode.SQL_PARSE_ERROR.getStatusCode() + ": Error occurred while parsing SQL to
+  // physical plan: "
   //            + "line 1:64 mismatched input
   // '`org.apache.iotdb.db.engine.trigger.example.Accumulator`' "
   //            + "expecting {AS, '.'}";
@@ -685,7 +700,8 @@ public class IoTDBSyntaxConventionStringLiteralIT {
   //  @Test
   //  public void testPipeSinkAttribute() {
   //    String errorMsg =
-  //        "401: Error occurred while parsing SQL to physical plan: "
+  //        TSStatusCode.SQL_PARSE_ERROR.getStatusCode() + ": Error occurred while parsing SQL to
+  // physical plan: "
   //            + "line 1:40 token recognition error at: '` = '127.0.0.1')'";
   //    try (Connection connection = EnvFactory.getEnv().getConnection();
   //        Statement statement = connection.createStatement()) {
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBTtlIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBTtlIT.java
index b96f4e24c6..abfb591ad5 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBTtlIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/IoTDBTtlIT.java
@@ -59,12 +59,12 @@ public class IoTDBTtlIT {
       try {
         statement.execute("SET TTL TO root.TTL_SG1 1000");
       } catch (SQLException e) {
-        assertEquals(322, e.getErrorCode());
+        assertEquals(TSStatusCode.DATABASE_NOT_EXIST.getStatusCode(), e.getErrorCode());
       }
       try {
         statement.execute("UNSET TTL TO root.TTL_SG1");
       } catch (SQLException e) {
-        assertEquals(322, e.getErrorCode());
+        assertEquals(TSStatusCode.DATABASE_NOT_EXIST.getStatusCode(), e.getErrorCode());
       }
 
       statement.execute("CREATE DATABASE root.TTL_SG1");
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBAlignedDataDeletionIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBAlignedDataDeletionIT.java
index 8c0a86e32b..6e01b63c10 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBAlignedDataDeletionIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/aligned/IoTDBAlignedDataDeletionIT.java
@@ -24,6 +24,7 @@ import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
 import org.apache.iotdb.itbase.category.LocalStandaloneIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -93,7 +94,8 @@ public class IoTDBAlignedDataDeletionIT {
       statement.execute("insert into root.vehicle.d0(time,s4) aligned values (10,true)");
 
       String errorMsg =
-          "416: For delete statement, where clause can only"
+          TSStatusCode.SEMANTIC_ERROR.getStatusCode()
+              + ": For delete statement, where clause can only"
               + " contain time expressions, value filter is not currently supported.";
 
       try {
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/cq/IoTDBCQIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/cq/IoTDBCQIT.java
index 84aff4a58a..aca7aa661e 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/cq/IoTDBCQIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/cq/IoTDBCQIT.java
@@ -21,6 +21,7 @@ package org.apache.iotdb.db.it.cq;
 import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -70,7 +71,8 @@ public class IoTDBCQIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "500: CQ: Specifying time range in GROUP BY TIME clause is prohibited.",
+            TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()
+                + ": CQ: Specifying time range in GROUP BY TIME clause is prohibited.",
             e.getMessage());
       }
 
@@ -89,7 +91,9 @@ public class IoTDBCQIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "500: CQ: Specifying time filters in the query body is prohibited.", e.getMessage());
+            TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()
+                + ": CQ: Specifying time filters in the query body is prohibited.",
+            e.getMessage());
       }
 
       // 3. no every clause meanwhile no group by time
@@ -105,7 +109,8 @@ public class IoTDBCQIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "416: CQ: At least one of the parameters `every_interval` and `group_by_interval` needs to be specified.",
+            TSStatusCode.SEMANTIC_ERROR.getStatusCode()
+                + ": CQ: At least one of the parameters `every_interval` and `group_by_interval` needs to be specified.",
             e.getMessage());
       }
 
@@ -121,7 +126,10 @@ public class IoTDBCQIT {
         statement.execute(sql);
         fail();
       } catch (Exception e) {
-        assertEquals("500: CQ: The query body misses an INTO clause.", e.getMessage());
+        assertEquals(
+            TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()
+                + ": CQ: The query body misses an INTO clause.",
+            e.getMessage());
       }
 
       // 5. EVERY interval is less than continuous_query_min_every_interval_in_ms in
@@ -140,7 +148,8 @@ public class IoTDBCQIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "500: CQ: Every interval [50] should not be lower than the `continuous_query_minimum_every_interval` [1000] configured.",
+            TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()
+                + ": CQ: Every interval [50] should not be lower than the `continuous_query_minimum_every_interval` [1000] configured.",
             e.getMessage());
       }
 
@@ -159,7 +168,8 @@ public class IoTDBCQIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "401: Error occurred while parsing SQL to physical plan: line 2:15 extraneous input '-' expecting DURATION_LITERAL",
+            TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+                + ": Error occurred while parsing SQL to physical plan: line 2:15 extraneous input '-' expecting DURATION_LITERAL",
             e.getMessage());
       }
 
@@ -177,7 +187,10 @@ public class IoTDBCQIT {
         statement.execute(sql);
         fail();
       } catch (Exception e) {
-        assertEquals("500: CQ: The start time offset should be greater than 0.", e.getMessage());
+        assertEquals(
+            TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()
+                + ": CQ: The start time offset should be greater than 0.",
+            e.getMessage());
       }
 
       // 8. end_time_offset < 0
@@ -195,7 +208,8 @@ public class IoTDBCQIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "401: Error occurred while parsing SQL to physical plan: line 2:20 extraneous input '-' expecting DURATION_LITERAL",
+            TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+                + ": Error occurred while parsing SQL to physical plan: line 2:20 extraneous input '-' expecting DURATION_LITERAL",
             e.getMessage());
       }
 
@@ -214,7 +228,8 @@ public class IoTDBCQIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "500: CQ: The start time offset should be greater than end time offset.",
+            TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()
+                + ": CQ: The start time offset should be greater than end time offset.",
             e.getMessage());
       }
 
@@ -233,7 +248,8 @@ public class IoTDBCQIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "500: CQ: The start time offset should be greater than end time offset.",
+            TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()
+                + ": CQ: The start time offset should be greater than end time offset.",
             e.getMessage());
       }
 
@@ -252,7 +268,8 @@ public class IoTDBCQIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "500: CQ: The start time offset should be greater than or equal to every interval.",
+            TSStatusCode.INTERNAL_SERVER_ERROR.getStatusCode()
+                + ": CQ: The start time offset should be greater than or equal to every interval.",
             e.getMessage());
       }
 
@@ -272,7 +289,8 @@ public class IoTDBCQIT {
         fail();
       } catch (Exception e) {
         assertEquals(
-            "401: Error occurred while parsing SQL to physical plan: line 3:15 mismatched input 'UNKNOWN' expecting {BLOCKED, DISCARD}",
+            TSStatusCode.SQL_PARSE_ERROR.getStatusCode()
+                + ": Error occurred while parsing SQL to physical plan: line 3:15 mismatched input 'UNKNOWN' expecting {BLOCKED, DISCARD}",
             e.getMessage());
       }
 
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/groupby/IoTDBHavingIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/groupby/IoTDBHavingIT.java
index 3f79c9e71b..7cebecee12 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/groupby/IoTDBHavingIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/groupby/IoTDBHavingIT.java
@@ -24,6 +24,7 @@ import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
 import org.apache.iotdb.itbase.category.LocalStandaloneIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -127,19 +128,23 @@ public class IoTDBHavingIT {
   public void testUnsatisfiedRuleQuery() {
     assertTestFail(
         "select count(s1) from root.** group by ([1,3),1ms), level=1 having sum(d1.s1) > 1",
-        "416: When Having used with GroupByLevel: the suffix paths can only be measurement or one-level wildcard");
+        TSStatusCode.SEMANTIC_ERROR.getStatusCode()
+            + ": When Having used with GroupByLevel: the suffix paths can only be measurement or one-level wildcard");
 
     assertTestFail(
         "select count(d1.s1) from root.** group by ([1,3),1ms), level=1 having sum(s1) > 1",
-        "416: When Having used with GroupByLevel: the suffix paths can only be measurement or one-level wildcard");
+        TSStatusCode.SEMANTIC_ERROR.getStatusCode()
+            + ": When Having used with GroupByLevel: the suffix paths can only be measurement or one-level wildcard");
 
     assertTestFail(
         "select count(d1.s1) from root.** group by ([1,3),1ms), level=1 having sum(s1) + s1 > 1",
-        "416: Raw data and aggregation result hybrid calculation is not supported");
+        TSStatusCode.SEMANTIC_ERROR.getStatusCode()
+            + ": Raw data and aggregation result hybrid calculation is not supported");
 
     assertTestFail(
         "select count(d1.s1) from root.** group by ([1,3),1ms), level=1 having s1 + 1 > 1",
-        "416: Expression of HAVING clause must to be an Aggregation");
+        TSStatusCode.SEMANTIC_ERROR.getStatusCode()
+            + ": Expression of HAVING clause must to be an Aggregation");
   }
 
   @Test
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBInIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBInIT.java
index b83dccfdf7..648ef3b0bf 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBInIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/query/IoTDBInIT.java
@@ -23,6 +23,7 @@ import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
 import org.apache.iotdb.itbase.category.LocalStandaloneIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.AfterClass;
 import org.junit.Assert;
@@ -103,16 +104,25 @@ public class IoTDBInIT {
   @Test
   public void testCastException() {
     assertTestFail(
-        "select * from root.** where s1 in (\"test\")", "400: \"test\" cannot be cast to [INT32]");
+        "select * from root.** where s1 in (\"test\")",
+        TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()
+            + ": \"test\" cannot be cast to [INT32]");
     assertTestFail(
-        "select * from root.** where s2 in (\"test\")", "400: \"test\" cannot be cast to [INT64]");
+        "select * from root.** where s2 in (\"test\")",
+        TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()
+            + ": \"test\" cannot be cast to [INT64]");
     assertTestFail(
-        "select * from root.** where s3 in (\"test\")", "400: \"test\" cannot be cast to [FLOAT]");
+        "select * from root.** where s3 in (\"test\")",
+        TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()
+            + ": \"test\" cannot be cast to [FLOAT]");
     assertTestFail(
-        "select * from root.** where s4 in (\"test\")", "400: \"test\" cannot be cast to [DOUBLE]");
+        "select * from root.** where s4 in (\"test\")",
+        TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()
+            + ": \"test\" cannot be cast to [DOUBLE]");
     assertTestFail(
         "select * from root.** where s5 in (\"test\")",
-        "400: \"test\" cannot be cast to [BOOLEAN]");
+        TSStatusCode.EXECUTE_STATEMENT_ERROR.getStatusCode()
+            + ": \"test\" cannot be cast to [BOOLEAN]");
   }
 
   /** Test for IOTDB-1540 */
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateStorageGroupIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateStorageGroupIT.java
index f9635222f6..cfebdadef8 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateStorageGroupIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBCreateStorageGroupIT.java
@@ -24,6 +24,7 @@ import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
 import org.apache.iotdb.itbase.category.LocalStandaloneIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -118,7 +119,10 @@ public class IoTDBCreateStorageGroupIT {
       statement.execute(String.format("create database %s", storageGroup));
       fail();
     } catch (SQLException e) {
-      Assert.assertEquals("903: root.sg has already been created as database", e.getMessage());
+      Assert.assertEquals(
+          TSStatusCode.DATABASE_ALREADY_EXISTS.getStatusCode()
+              + ": root.sg has already been created as database",
+          e.getMessage());
     }
   }
 
@@ -132,7 +136,10 @@ public class IoTDBCreateStorageGroupIT {
       statement.execute("create database root.sg.`device`");
       fail();
     } catch (SQLException e) {
-      Assert.assertEquals("903: root.sg has already been created as database", e.getMessage());
+      Assert.assertEquals(
+          TSStatusCode.DATABASE_ALREADY_EXISTS.getStatusCode()
+              + ": root.sg has already been created as database",
+          e.getMessage());
     }
   }
 }
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeactivateTemplateIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeactivateTemplateIT.java
index 526bf00639..08f2bbae57 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeactivateTemplateIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeactivateTemplateIT.java
@@ -22,6 +22,7 @@ package org.apache.iotdb.db.it.schema;
 import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -203,7 +204,9 @@ public class IoTDBDeactivateTemplateIT {
       Assert.fail();
     } catch (SQLException e) {
       Assert.assertEquals(
-          "324: Schema Template t1 is not set on any prefix path of [root.sg5.d1]", e.getMessage());
+          TSStatusCode.TEMPLATE_NOT_SET.getStatusCode()
+              + ": Schema Template t1 is not set on any prefix path of [root.sg5.d1]",
+          e.getMessage());
     }
 
     statement.execute("CREATE DATABASE root.sg5");
@@ -213,7 +216,8 @@ public class IoTDBDeactivateTemplateIT {
       Assert.fail();
     } catch (SQLException e) {
       Assert.assertEquals(
-          "366: Target schema Template is not activated on any path matched by given path pattern",
+          TSStatusCode.TEMPLATE_NOT_ACTIVATED.getStatusCode()
+              + ": Target schema Template is not activated on any path matched by given path pattern",
           e.getMessage());
     }
   }
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteTimeseriesIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteTimeseriesIT.java
index 7cd47dc8cb..5d31d5e313 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteTimeseriesIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBDeleteTimeseriesIT.java
@@ -23,6 +23,7 @@ import org.apache.iotdb.it.env.ConfigFactory;
 import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -398,7 +399,8 @@ public class IoTDBDeleteTimeseriesIT {
       Assert.assertTrue(
           e.getMessage()
               .contains(
-                  "304: Timeseries [root.**] does not exist or is represented by schema template"));
+                  TSStatusCode.PATH_NOT_EXIST.getStatusCode()
+                      + ": Timeseries [root.**] does not exist or is represented by schema template"));
     }
 
     String[] retArray1 = new String[] {"0,4,4,4,4"};
@@ -429,7 +431,8 @@ public class IoTDBDeleteTimeseriesIT {
       Assert.assertTrue(
           e.getMessage()
               .contains(
-                  "304: Timeseries [root.*.d1.s3] does not exist or is represented by schema template"));
+                  TSStatusCode.PATH_NOT_EXIST.getStatusCode()
+                      + ": Timeseries [root.*.d1.s3] does not exist or is represented by schema template"));
     }
   }
 
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSchemaTemplateIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSchemaTemplateIT.java
index 96c19b4714..d93f78727c 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSchemaTemplateIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/schema/IoTDBSchemaTemplateIT.java
@@ -22,6 +22,7 @@ import org.apache.iotdb.db.mpp.common.header.ColumnHeaderConstant;
 import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -74,7 +75,9 @@ public class IoTDBSchemaTemplateIT {
           "CREATE SCHEMA TEMPLATE t1 (s1 INT64 encoding=RLE compressor=SNAPPY, s2 INT32)");
       Assert.fail();
     } catch (SQLException e) {
-      Assert.assertEquals("303: Duplicated template name: t1", e.getMessage());
+      Assert.assertEquals(
+          TSStatusCode.METADATA_ERROR.getStatusCode() + ": Duplicated template name: t1",
+          e.getMessage());
     }
 
     // set schema template
@@ -87,7 +90,9 @@ public class IoTDBSchemaTemplateIT {
       Assert.fail();
     } catch (SQLException e) {
       Assert.assertEquals(
-          "303: Template [t1] has been set on MTree, cannot be dropped now.", e.getMessage());
+          TSStatusCode.METADATA_ERROR.getStatusCode()
+              + ": Template [t1] has been set on MTree, cannot be dropped now.",
+          e.getMessage());
     }
 
     try (ResultSet resultSet = statement.executeQuery("SHOW TIMESERIES root.sg1.**")) {
@@ -145,7 +150,9 @@ public class IoTDBSchemaTemplateIT {
       statement.execute("UNSET SCHEMA TEMPLATE t1 FROM root.sg1.d1");
       Assert.fail();
     } catch (SQLException e) {
-      Assert.assertEquals("326: Template is in use on root.sg1.d1", e.getMessage());
+      Assert.assertEquals(
+          TSStatusCode.TEMPLATE_IS_IN_USE.getStatusCode() + ": Template is in use on root.sg1.d1",
+          e.getMessage());
     }
   }
 
@@ -157,7 +164,9 @@ public class IoTDBSchemaTemplateIT {
           "CREATE SCHEMA TEMPLATE t1 (s1 INT64 encoding=RLE compressor=SNAPPY, s2 INT32)");
       Assert.fail();
     } catch (SQLException e) {
-      Assert.assertEquals("303: Duplicated template name: t1", e.getMessage());
+      Assert.assertEquals(
+          TSStatusCode.METADATA_ERROR.getStatusCode() + ": Duplicated template name: t1",
+          e.getMessage());
     }
 
     // set schema template
@@ -219,7 +228,9 @@ public class IoTDBSchemaTemplateIT {
       statement.execute("UNSET SCHEMA TEMPLATE t1 FROM root.sg1.d1");
       Assert.fail();
     } catch (SQLException e) {
-      Assert.assertEquals("326: Template is in use on root.sg1.d1", e.getMessage());
+      Assert.assertEquals(
+          TSStatusCode.TEMPLATE_IS_IN_USE.getStatusCode() + ": Template is in use on root.sg1.d1",
+          e.getMessage());
     }
   }
 
diff --git a/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerManagementIT.java b/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerManagementIT.java
index a96d54e8ae..35801a05c7 100644
--- a/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerManagementIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/db/it/trigger/IoTDBTriggerManagementIT.java
@@ -24,6 +24,7 @@ import org.apache.iotdb.it.env.EnvFactory;
 import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
 import org.apache.iotdb.itbase.category.LocalStandaloneIT;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Before;
@@ -544,7 +545,8 @@ public class IoTDBTriggerManagementIT {
           fail();
         } catch (Exception e) {
           assertEquals(
-              "602: No permissions for this operation, please add privilege CREATE_TRIGGER",
+              TSStatusCode.NO_PERMISSION.getStatusCode()
+                  + ": No permissions for this operation, please add privilege CREATE_TRIGGER",
               e.getMessage());
         }
 
@@ -573,7 +575,8 @@ public class IoTDBTriggerManagementIT {
           fail();
         } catch (Exception e) {
           assertEquals(
-              "602: No permissions for this operation, please add privilege CREATE_TRIGGER",
+              TSStatusCode.NO_PERMISSION.getStatusCode()
+                  + ": No permissions for this operation, please add privilege CREATE_TRIGGER",
               e.getMessage());
         }
       }
@@ -604,7 +607,8 @@ public class IoTDBTriggerManagementIT {
           fail();
         } catch (Exception e) {
           assertEquals(
-              "602: No permissions for this operation, please add privilege DROP_TRIGGER",
+              TSStatusCode.NO_PERMISSION.getStatusCode()
+                  + ": No permissions for this operation, please add privilege DROP_TRIGGER",
               e.getMessage());
         }
 
@@ -615,7 +619,8 @@ public class IoTDBTriggerManagementIT {
           fail();
         } catch (Exception e) {
           assertEquals(
-              "602: No permissions for this operation, please add privilege DROP_TRIGGER",
+              TSStatusCode.NO_PERMISSION.getStatusCode()
+                  + ": No permissions for this operation, please add privilege DROP_TRIGGER",
               e.getMessage());
         }
 
diff --git a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSchemaTemplateIT.java b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSchemaTemplateIT.java
index 1301e3264e..f7231492fb 100644
--- a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSchemaTemplateIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSchemaTemplateIT.java
@@ -25,6 +25,7 @@ import org.apache.iotdb.it.framework.IoTDBTestRunner;
 import org.apache.iotdb.itbase.category.ClusterIT;
 import org.apache.iotdb.rpc.IoTDBConnectionException;
 import org.apache.iotdb.rpc.StatementExecutionException;
+import org.apache.iotdb.rpc.TSStatusCode;
 import org.apache.iotdb.session.ISession;
 import org.apache.iotdb.session.template.MeasurementNode;
 import org.apache.iotdb.session.template.Template;
@@ -88,7 +89,9 @@ public class IoTDBSessionSchemaTemplateIT {
       session.setSchemaTemplate("flatTemplate", "root.sg.d0");
       fail();
     } catch (StatementExecutionException e) {
-      assertEquals("303: Template already exists on root.sg.d0", e.getMessage());
+      assertEquals(
+          TSStatusCode.METADATA_ERROR.getStatusCode() + ": Template already exists on root.sg.d0",
+          e.getMessage());
     }
   }
 
@@ -184,7 +187,9 @@ public class IoTDBSessionSchemaTemplateIT {
       session.createSchemaTemplate(temp1);
       fail();
     } catch (Exception e) {
-      assertEquals("303: Duplicated template name: template1", e.getMessage());
+      assertEquals(
+          TSStatusCode.METADATA_ERROR.getStatusCode() + ": Duplicated template name: template1",
+          e.getMessage());
     }
 
     session.dropSchemaTemplate("template1");
@@ -197,7 +202,8 @@ public class IoTDBSessionSchemaTemplateIT {
       fail();
     } catch (Exception e) {
       assertEquals(
-          "303: Template [template1] has been set on MTree, cannot be dropped now.",
+          TSStatusCode.METADATA_ERROR.getStatusCode()
+              + ": Template [template1] has been set on MTree, cannot be dropped now.",
           e.getMessage());
     }
 
diff --git a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSimpleIT.java b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSimpleIT.java
index 7e1b8d5cae..60f85f50ae 100644
--- a/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSimpleIT.java
+++ b/integration-test/src/test/java/org/apache/iotdb/session/it/IoTDBSessionSimpleIT.java
@@ -1011,7 +1011,7 @@ public class IoTDBSessionSimpleIT {
             e.getMessage()
                 .contains(
                     String.format(
-                        msg, TSStatusCode.PATH_ILLEGAL, OperationType.INSERT_RECORDS, deviceId)));
+                        msg, TSStatusCode.ILLEGAL_PATH, OperationType.INSERT_RECORDS, deviceId)));
       }
 
       try {
@@ -1023,7 +1023,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.INSERT_STRING_RECORDS,
                         deviceIds.get(0))));
       }
@@ -1036,7 +1036,7 @@ public class IoTDBSessionSimpleIT {
             e.getMessage()
                 .contains(
                     String.format(
-                        msg, TSStatusCode.PATH_ILLEGAL, OperationType.INSERT_RECORD, deviceId)));
+                        msg, TSStatusCode.ILLEGAL_PATH, OperationType.INSERT_RECORD, deviceId)));
       }
 
       try {
@@ -1048,7 +1048,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.INSERT_STRING_RECORD,
                         deviceId)));
       }
@@ -1063,7 +1063,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.INSERT_RECORDS_OF_ONE_DEVICE,
                         deviceId)));
       }
@@ -1077,7 +1077,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.DELETE_DATA,
                         deviceId + ".s1")));
       }
@@ -1108,7 +1108,7 @@ public class IoTDBSessionSimpleIT {
             e.getMessage()
                 .contains(
                     String.format(
-                        msg, TSStatusCode.PATH_ILLEGAL, OperationType.INSERT_TABLET, deviceId)));
+                        msg, TSStatusCode.ILLEGAL_PATH, OperationType.INSERT_TABLET, deviceId)));
       }
 
       try {
@@ -1152,7 +1152,7 @@ public class IoTDBSessionSimpleIT {
             e.getMessage()
                 .contains(
                     String.format(
-                        msg, TSStatusCode.PATH_ILLEGAL, OperationType.INSERT_TABLETS, deviceId)));
+                        msg, TSStatusCode.ILLEGAL_PATH, OperationType.INSERT_TABLETS, deviceId)));
       }
 
       try {
@@ -1164,7 +1164,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.SET_STORAGE_GROUP,
                         "root..sg")));
       }
@@ -1179,7 +1179,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.CREATE_TIMESERIES,
                         "root.sg..d1.s1")));
       }
@@ -1202,7 +1202,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.CREATE_ALIGNED_TIMESERIES,
                         deviceId)));
       }
@@ -1224,7 +1224,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.CREATE_MULTI_TIMESERIES,
                         "root.sg.d1..s1")));
       }
@@ -1238,7 +1238,7 @@ public class IoTDBSessionSimpleIT {
                 .contains(
                     String.format(
                         msg,
-                        TSStatusCode.PATH_ILLEGAL,
+                        TSStatusCode.ILLEGAL_PATH,
                         OperationType.DELETE_TIMESERIES,
                         "root.sg.d1..s1")));
       }
diff --git a/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java b/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java
index d8e216b9d9..98ef421acb 100644
--- a/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java
+++ b/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBAuthorizationIT.java
@@ -25,6 +25,7 @@ import org.apache.iotdb.db.qp.logical.Operator;
 import org.apache.iotdb.db.utils.EnvironmentUtils;
 import org.apache.iotdb.itbase.category.LocalStandaloneTest;
 import org.apache.iotdb.jdbc.Config;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -203,7 +204,7 @@ public class IoTDBAuthorizationIT {
       try {
         userStmt.execute(statement);
       } catch (SQLException e) {
-        assertTrue(e.getMessage().contains("602"));
+        assertTrue(e.getMessage().contains(TSStatusCode.NO_PERMISSION.getStatusCode() + ""));
         continue;
       }
       fail();
@@ -229,7 +230,7 @@ public class IoTDBAuthorizationIT {
       try {
         userStmt.execute(statement);
       } catch (SQLException e) {
-        assertTrue(e.getMessage().contains("602"));
+        assertTrue(e.getMessage().contains(TSStatusCode.NO_PERMISSION.getStatusCode() + ""));
         continue;
       }
       fail();
diff --git a/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBSchemaTemplateIT.java b/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBSchemaTemplateIT.java
index b6751f27da..88806ab7bb 100644
--- a/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBSchemaTemplateIT.java
+++ b/integration/src/test/java/org/apache/iotdb/db/integration/IoTDBSchemaTemplateIT.java
@@ -23,6 +23,7 @@ import org.apache.iotdb.db.utils.EnvironmentUtils;
 import org.apache.iotdb.itbase.category.LocalStandaloneTest;
 import org.apache.iotdb.jdbc.Config;
 import org.apache.iotdb.jdbc.IoTDBSQLException;
+import org.apache.iotdb.rpc.TSStatusCode;
 
 import org.junit.After;
 import org.junit.Assert;
@@ -74,7 +75,9 @@ public class IoTDBSchemaTemplateIT {
       statement.execute(
           "CREATE SCHEMA TEMPLATE t1 (s1 INT64 encoding=RLE compressor=SNAPPY, s2 INT32)");
     } catch (IoTDBSQLException e) {
-      Assert.assertEquals("303: Duplicated template name: t1", e.getMessage());
+      Assert.assertEquals(
+          TSStatusCode.METADATA_ERROR.getStatusCode() + ": Duplicated template name: t1",
+          e.getMessage());
     }
 
     // set schema template
@@ -86,7 +89,9 @@ public class IoTDBSchemaTemplateIT {
       statement.execute("DROP SCHEMA TEMPLATE t1");
     } catch (IoTDBSQLException e) {
       Assert.assertEquals(
-          "303: Template [t1] has been set on MTree, cannot be dropped now.", e.getMessage());
+          TSStatusCode.METADATA_ERROR.getStatusCode()
+              + ": Template [t1] has been set on MTree, cannot be dropped now.",
+          e.getMessage());
     }
 
     statement.execute("SHOW TIMESERIES root.sg1.**");
@@ -145,7 +150,9 @@ public class IoTDBSchemaTemplateIT {
     try {
       statement.execute("UNSET SCHEMA TEMPLATE t1 FROM root.sg1.d1");
     } catch (IoTDBSQLException e) {
-      Assert.assertEquals("326: Template is in use on root.sg1.d1", e.getMessage());
+      Assert.assertEquals(
+          TSStatusCode.TEMPLATE_IS_IN_USE.getStatusCode() + ": Template is in use on root.sg1.d1",
+          e.getMessage());
     }
   }
 
@@ -156,7 +163,9 @@ public class IoTDBSchemaTemplateIT {
       statement.execute(
           "CREATE SCHEMA TEMPLATE t1 (s1 INT64 encoding=RLE compressor=SNAPPY, s2 INT32)");
     } catch (IoTDBSQLException e) {
-      Assert.assertEquals("303: Duplicated template name: t1", e.getMessage());
+      Assert.assertEquals(
+          TSStatusCode.METADATA_ERROR.getStatusCode() + ": Duplicated template name: t1",
+          e.getMessage());
     }
 
     // set schema template
@@ -219,7 +228,9 @@ public class IoTDBSchemaTemplateIT {
     try {
       statement.execute("UNSET SCHEMA TEMPLATE t1 FROM root.sg1.d1");
     } catch (IoTDBSQLException e) {
-      Assert.assertEquals("326: Template is in use on root.sg1.d1", e.getMessage());
+      Assert.assertEquals(
+          TSStatusCode.TEMPLATE_IS_IN_USE.getStatusCode() + ": Template is in use on root.sg1.d1",
+          e.getMessage());
     }
   }
 
diff --git a/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java
index b3633436ef..80dd103eb7 100644
--- a/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java
+++ b/jdbc/src/main/java/org/apache/iotdb/jdbc/IoTDBStatement.java
@@ -343,7 +343,7 @@ public class IoTDBStatement implements Statement {
       if (execResp.getCode() == TSStatusCode.MULTIPLE_ERROR.getStatusCode()) {
         result[i] = execResp.getSubStatus().get(i).code;
         if (result[i] != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-            && result[i] != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+            && result[i] != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
           allSuccess = false;
           message
               .append(execResp.getSubStatus().get(i).message)
@@ -356,7 +356,7 @@ public class IoTDBStatement implements Statement {
         allSuccess =
             allSuccess
                 && (execResp.getCode() == TSStatusCode.SUCCESS_STATUS.getStatusCode()
-                    || execResp.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode());
+                    || execResp.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode());
         result[i] = execResp.getCode();
         message.setLength(0);
         message.append(execResp.getMessage());
diff --git a/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPathException.java b/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPathException.java
index 70fce45364..f1c46742cc 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPathException.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/exception/IllegalPathException.java
@@ -26,13 +26,13 @@ public class IllegalPathException extends MetadataException {
 
   public IllegalPathException(String path) {
     super(String.format("%s is not a legal path", path));
-    errorCode = TSStatusCode.PATH_ILLEGAL.getStatusCode();
+    errorCode = TSStatusCode.ILLEGAL_PATH.getStatusCode();
     this.isUserException = true;
   }
 
   public IllegalPathException(String path, String reason) {
     super(String.format("%s is not a legal path, because %s", path, reason));
-    errorCode = TSStatusCode.PATH_ILLEGAL.getStatusCode();
+    errorCode = TSStatusCode.ILLEGAL_PATH.getStatusCode();
     this.isUserException = true;
   }
 }
diff --git a/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java b/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java
index 54d66c0ea9..6eb10e4e50 100644
--- a/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java
+++ b/node-commons/src/main/java/org/apache/iotdb/commons/utils/StatusUtils.java
@@ -57,14 +57,14 @@ public class StatusUtils {
       case SUCCESS_STATUS:
         status.setMessage("Executed successfully.");
         break;
-      case TIME_OUT:
+      case INTERNAL_REQUEST_TIME_OUT:
         status.setMessage("Request timed out.");
         break;
       case INCOMPATIBLE_VERSION:
         status.setMessage("Incompatible version.");
         break;
-      case NODE_DELETE_ERROR:
-        status.setMessage("Failed while deleting node.");
+      case REMOVE_DATANODE_ERROR:
+        status.setMessage("Failed while removing DataNode.");
         break;
       case ALIAS_ALREADY_EXIST:
         status.setMessage("Alias already exists.");
@@ -84,13 +84,10 @@ public class StatusUtils {
       case COMPACTION_ERROR:
         status.setMessage("Meet error while merging.");
         break;
-      case SYSTEM_CHECK_ERROR:
-        status.setMessage("Meet error while system checking.");
-        break;
       case SYNC_CONNECTION_ERROR:
         status.setMessage("Meet error while sync connecting.");
         break;
-      case DATABASE_PROCESS_ERROR:
+      case DATAREGION_PROCESS_ERROR:
         status.setMessage("Database processor related error.");
         break;
       case STORAGE_ENGINE_ERROR:
@@ -99,7 +96,7 @@ public class StatusUtils {
       case TSFILE_PROCESSOR_ERROR:
         status.setMessage("TsFile processor related error.");
         break;
-      case PATH_ILLEGAL:
+      case ILLEGAL_PATH:
         status.setMessage("Illegal path.");
         break;
       case LOAD_FILE_ERROR:
@@ -141,7 +138,7 @@ public class StatusUtils {
       case CLOSE_OPERATION_ERROR:
         status.setMessage("Meet error in close operation.");
         break;
-      case READ_ONLY_SYSTEM:
+      case SYSTEM_READ_ONLY:
         status.setMessage("Database is read-only.");
         break;
       case DISK_SPACE_INSUFFICIENT:
@@ -165,7 +162,7 @@ public class StatusUtils {
       case UNSUPPORTED_OPERATION:
         status.setMessage("Unsupported operation.");
         break;
-      case NO_CONNECTION:
+      case CAN_NOT_CONNECT_DATANODE:
         status.setMessage("Node cannot be reached.");
         break;
       default:
diff --git a/server/src/main/java/org/apache/iotdb/db/auth/StandaloneAuthorityFetcher.java b/server/src/main/java/org/apache/iotdb/db/auth/StandaloneAuthorityFetcher.java
index 735fd42c35..12bedec871 100644
--- a/server/src/main/java/org/apache/iotdb/db/auth/StandaloneAuthorityFetcher.java
+++ b/server/src/main/java/org/apache/iotdb/db/auth/StandaloneAuthorityFetcher.java
@@ -50,7 +50,7 @@ public class StandaloneAuthorityFetcher implements IAuthorityFetcher {
         return RpcUtils.getStatus(TSStatusCode.WRONG_LOGIN_PASSWORD, "Authentication failed.");
       }
     } catch (AuthException e) {
-      return RpcUtils.getStatus(TSStatusCode.AUTHENTICATION_FAILED, e.getMessage());
+      return RpcUtils.getStatus(TSStatusCode.AUTHENTICATION_ERROR, e.getMessage());
     }
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java b/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java
index e85ae84c85..9b699608f7 100644
--- a/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java
+++ b/server/src/main/java/org/apache/iotdb/db/client/ConfigNodeClient.java
@@ -269,7 +269,7 @@ public class ConfigNodeClient
   }
 
   private boolean updateConfigNodeLeader(TSStatus status) {
-    if (status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+    if (status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       if (status.isSetRedirectNode()) {
         configLeader =
             new TEndPoint(status.getRedirectNode().getIp(), status.getRedirectNode().getPort());
diff --git a/server/src/main/java/org/apache/iotdb/db/engine/StorageEngineV2.java b/server/src/main/java/org/apache/iotdb/db/engine/StorageEngineV2.java
index 7702583de7..19cd375a23 100644
--- a/server/src/main/java/org/apache/iotdb/db/engine/StorageEngineV2.java
+++ b/server/src/main/java/org/apache/iotdb/db/engine/StorageEngineV2.java
@@ -730,7 +730,7 @@ public class StorageEngineV2 implements IService {
               "IO error when writing piece node of TsFile %s to DataRegion %s.",
               pieceNode.getTsFile(), dataRegionId),
           e);
-      status.setCode(TSStatusCode.DATABASE_PROCESS_ERROR.getStatusCode());
+      status.setCode(TSStatusCode.LOAD_FILE_ERROR.getStatusCode());
       status.setMessage(e.getMessage());
       return status;
     }
@@ -769,11 +769,7 @@ public class StorageEngineV2 implements IService {
           status.setCode(TSStatusCode.ILLEGAL_PARAMETER.getStatusCode());
           status.setMessage(String.format("Wrong load command %s.", loadCommand));
       }
-    } catch (IOException e) {
-      logger.error(String.format("Execute load command %s error.", loadCommand), e);
-      status.setCode(TSStatusCode.DATABASE_PROCESS_ERROR.getStatusCode());
-      status.setMessage(e.getMessage());
-    } catch (LoadFileException e) {
+    } catch (IOException | LoadFileException e) {
       logger.error(String.format("Execute load command %s error.", loadCommand), e);
       status.setCode(TSStatusCode.LOAD_FILE_ERROR.getStatusCode());
       status.setMessage(e.getMessage());
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/ContinuousQueryException.java b/server/src/main/java/org/apache/iotdb/db/exception/ContinuousQueryException.java
deleted file mode 100644
index e846e986e6..0000000000
--- a/server/src/main/java/org/apache/iotdb/db/exception/ContinuousQueryException.java
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.iotdb.db.exception;
-
-import org.apache.iotdb.rpc.TSStatusCode;
-
-public class ContinuousQueryException extends StorageEngineException {
-
-  public ContinuousQueryException(String message) {
-    super(message, TSStatusCode.CONTINUOUS_QUERY_ERROR.getStatusCode());
-    this.isUserException = true;
-  }
-
-  public ContinuousQueryException(String message, Exception e) {
-    super(message, e);
-    this.errorCode = TSStatusCode.CONTINUOUS_QUERY_ERROR.getStatusCode();
-    this.isUserException = true;
-  }
-}
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/DataRegionException.java b/server/src/main/java/org/apache/iotdb/db/exception/DataRegionException.java
index 5c76935147..3dc9f5d710 100644
--- a/server/src/main/java/org/apache/iotdb/db/exception/DataRegionException.java
+++ b/server/src/main/java/org/apache/iotdb/db/exception/DataRegionException.java
@@ -26,10 +26,10 @@ public class DataRegionException extends IoTDBException {
   private static final long serialVersionUID = 7373978140952977661L;
 
   public DataRegionException(Exception exception) {
-    super(exception, TSStatusCode.DATABASE_PROCESS_ERROR.getStatusCode());
+    super(exception, TSStatusCode.DATAREGION_PROCESS_ERROR.getStatusCode());
   }
 
   public DataRegionException(String message) {
-    super(message, TSStatusCode.DATABASE_PROCESS_ERROR.getStatusCode());
+    super(message, TSStatusCode.DATAREGION_PROCESS_ERROR.getStatusCode());
   }
 }
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java b/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java
index 184e584683..1d272280e9 100644
--- a/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java
+++ b/server/src/main/java/org/apache/iotdb/db/exception/StorageEngineReadonlyException.java
@@ -27,6 +27,6 @@ public class StorageEngineReadonlyException extends StorageEngineException {
       "Database is read-only, and does not accept non-query operation now";
 
   public StorageEngineReadonlyException() {
-    super(ERROR_MESSAGE, TSStatusCode.READ_ONLY_SYSTEM.getStatusCode());
+    super(ERROR_MESSAGE, TSStatusCode.SYSTEM_READ_ONLY.getStatusCode());
   }
 }
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/SystemCheckException.java b/server/src/main/java/org/apache/iotdb/db/exception/SystemCheckException.java
deleted file mode 100644
index 609a24be8f..0000000000
--- a/server/src/main/java/org/apache/iotdb/db/exception/SystemCheckException.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-package org.apache.iotdb.db.exception;
-
-import org.apache.iotdb.commons.exception.IoTDBException;
-import org.apache.iotdb.rpc.TSStatusCode;
-
-public class SystemCheckException extends IoTDBException {
-
-  private static final long serialVersionUID = 3845398095925149972L;
-
-  public SystemCheckException(String walFolder) {
-    super(
-        String.format("[%s] is not a directory", walFolder),
-        TSStatusCode.SYSTEM_CHECK_ERROR.getStatusCode());
-  }
-}
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/index/UnsupportedIndexTypeException.java b/server/src/main/java/org/apache/iotdb/db/exception/index/UnsupportedIndexTypeException.java
deleted file mode 100644
index 1bea1415c6..0000000000
--- a/server/src/main/java/org/apache/iotdb/db/exception/index/UnsupportedIndexTypeException.java
+++ /dev/null
@@ -1,32 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.iotdb.db.exception.index;
-
-import org.apache.iotdb.db.exception.query.QueryProcessException;
-import org.apache.iotdb.rpc.TSStatusCode;
-
-public class UnsupportedIndexTypeException extends QueryProcessException {
-
-  private static final long serialVersionUID = -7091830159338197925L;
-
-  public UnsupportedIndexTypeException(String indexType) {
-    super(
-        "Unsupported index type: " + indexType,
-        TSStatusCode.UNSUPPORTED_INDEX_TYPE.getStatusCode());
-  }
-}
diff --git a/server/src/main/java/org/apache/iotdb/db/exception/metadata/DeleteFailedException.java b/server/src/main/java/org/apache/iotdb/db/exception/metadata/DeleteFailedException.java
deleted file mode 100644
index 2bff5f9300..0000000000
--- a/server/src/main/java/org/apache/iotdb/db/exception/metadata/DeleteFailedException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- *
- */
-
-package org.apache.iotdb.db.exception.metadata;
-
-import org.apache.iotdb.commons.exception.MetadataException;
-import org.apache.iotdb.rpc.TSStatusCode;
-
-public class DeleteFailedException extends MetadataException {
-
-  private String name;
-
-  public DeleteFailedException(String name) {
-    super(
-        String.format("Node [%s] is being used. Deletion failed.", name),
-        TSStatusCode.NODE_DELETE_ERROR.getStatusCode());
-    this.name = name;
-  }
-
-  public String getName() {
-    return name;
-  }
-}
diff --git a/server/src/main/java/org/apache/iotdb/db/index/common/IndexType.java b/server/src/main/java/org/apache/iotdb/db/index/common/IndexType.java
index 177e7bd47f..359b5422b4 100644
--- a/server/src/main/java/org/apache/iotdb/db/index/common/IndexType.java
+++ b/server/src/main/java/org/apache/iotdb/db/index/common/IndexType.java
@@ -18,7 +18,6 @@
  */
 package org.apache.iotdb.db.index.common;
 
-import org.apache.iotdb.db.exception.index.UnsupportedIndexTypeException;
 import org.apache.iotdb.tsfile.exception.NotImplementedException;
 
 public enum IndexType {
@@ -72,13 +71,8 @@ public enum IndexType {
     }
   }
 
-  public static IndexType getIndexType(String indexTypeString)
-      throws UnsupportedIndexTypeException {
+  public static IndexType getIndexType(String indexTypeString) {
     String normalized = indexTypeString.toUpperCase();
-    try {
-      return IndexType.valueOf(normalized);
-    } catch (IllegalArgumentException e) {
-      throw new UnsupportedIndexTypeException(indexTypeString);
-    }
+    return IndexType.valueOf(normalized);
   }
 }
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionMemoryImpl.java b/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionMemoryImpl.java
index ed1e177229..cf791102ac 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionMemoryImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionMemoryImpl.java
@@ -30,7 +30,6 @@ import org.apache.iotdb.consensus.ConsensusFactory;
 import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
 import org.apache.iotdb.db.engine.trigger.executor.TriggerEngine;
-import org.apache.iotdb.db.exception.metadata.DeleteFailedException;
 import org.apache.iotdb.db.exception.metadata.MeasurementAlreadyExistException;
 import org.apache.iotdb.db.exception.metadata.PathAlreadyExistException;
 import org.apache.iotdb.db.exception.metadata.PathNotExistException;
@@ -772,7 +771,7 @@ public class SchemaRegionMemoryImpl implements ISchemaRegion {
       Set<String> failedNames = new HashSet<>();
       int deletedNum = 0;
       for (PartialPath p : allTimeseries) {
-        deleteSingleTimeseriesInternal(p, failedNames);
+        deleteSingleTimeseriesInternal(p);
         deletedNum++;
       }
       return new Pair<>(deletedNum, failedNames);
@@ -890,15 +889,10 @@ public class SchemaRegionMemoryImpl implements ISchemaRegion {
     return deleteTimeseries(pathPattern, false);
   }
 
-  private void deleteSingleTimeseriesInternal(PartialPath p, Set<String> failedNames)
-      throws MetadataException, IOException {
-    try {
-      PartialPath emptyStorageGroup = deleteOneTimeseriesUpdateStatisticsAndDropTrigger(p);
-      if (!isRecovering) {
-        writeToMLog(SchemaRegionPlanFactory.getDeleteTimeSeriesPlan(Collections.singletonList(p)));
-      }
-    } catch (DeleteFailedException e) {
-      failedNames.add(e.getName());
+  private void deleteSingleTimeseriesInternal(PartialPath p) throws MetadataException, IOException {
+    deleteOneTimeseriesUpdateStatisticsAndDropTrigger(p);
+    if (!isRecovering) {
+      writeToMLog(SchemaRegionPlanFactory.getDeleteTimeSeriesPlan(Collections.singletonList(p)));
     }
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java b/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java
index bb9c4c66f1..6daed3b6a5 100644
--- a/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/metadata/schemaregion/SchemaRegionSchemaFileImpl.java
@@ -30,7 +30,6 @@ import org.apache.iotdb.db.conf.IoTDBConfig;
 import org.apache.iotdb.db.conf.IoTDBDescriptor;
 import org.apache.iotdb.db.engine.trigger.executor.TriggerEngine;
 import org.apache.iotdb.db.exception.metadata.AliasAlreadyExistException;
-import org.apache.iotdb.db.exception.metadata.DeleteFailedException;
 import org.apache.iotdb.db.exception.metadata.PathAlreadyExistException;
 import org.apache.iotdb.db.exception.metadata.PathNotExistException;
 import org.apache.iotdb.db.exception.metadata.SchemaDirCreationFailureException;
@@ -851,7 +850,7 @@ public class SchemaRegionSchemaFileImpl implements ISchemaRegion {
       Set<String> failedNames = new HashSet<>();
       int deletedNum = 0;
       for (PartialPath p : allTimeseries) {
-        deleteSingleTimeseriesInternal(p, failedNames);
+        deleteSingleTimeseriesInternal(p);
         deletedNum++;
       }
       return new Pair<>(deletedNum, failedNames);
@@ -971,15 +970,10 @@ public class SchemaRegionSchemaFileImpl implements ISchemaRegion {
     return deleteTimeseries(pathPattern, false);
   }
 
-  private void deleteSingleTimeseriesInternal(PartialPath p, Set<String> failedNames)
-      throws MetadataException, IOException {
-    try {
-      PartialPath emptyStorageGroup = deleteOneTimeseriesUpdateStatisticsAndDropTrigger(p);
-      if (!isRecovering) {
-        writeToMLog(SchemaRegionPlanFactory.getDeleteTimeSeriesPlan(Collections.singletonList(p)));
-      }
-    } catch (DeleteFailedException e) {
-      failedNames.add(e.getName());
+  private void deleteSingleTimeseriesInternal(PartialPath p) throws MetadataException, IOException {
+    deleteOneTimeseriesUpdateStatisticsAndDropTrigger(p);
+    if (!isRecovering) {
+      writeToMLog(SchemaRegionPlanFactory.getDeleteTimeSeriesPlan(Collections.singletonList(p)));
     }
   }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java
index 4b1b57dfa3..dbcefcafea 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/execution/operator/process/AbstractIntoOperator.java
@@ -115,7 +115,7 @@ public abstract class AbstractIntoOperator implements ProcessOperator {
     }
     TSStatus executionStatus = client.insertTablets(insertMultiTabletsStatement);
     if (executionStatus.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-        && executionStatus.getCode() != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+        && executionStatus.getCode() != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       String message =
           String.format(
               "Error occurred while inserting tablets in SELECT INTO: %s",
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
index 8c48c6a574..d7707926c6 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/QueryExecution.java
@@ -550,10 +550,11 @@ public class QueryExecution implements IQueryExecution {
         // multiple devices
         if (statusCode == TSStatusCode.SUCCESS_STATUS) {
           List<TSStatus> subStatus = new ArrayList<>();
-          tsstatus.setCode(TSStatusCode.NEED_REDIRECTION.getStatusCode());
+          tsstatus.setCode(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode());
           for (TEndPoint endPoint : redirectNodeList) {
             subStatus.add(
-                StatusUtils.getStatus(TSStatusCode.NEED_REDIRECTION).setRedirectNode(endPoint));
+                StatusUtils.getStatus(TSStatusCode.REDIRECTION_RECOMMEND)
+                    .setRedirectNode(endPoint));
           }
           tsstatus.setSubStatus(subStatus);
         }
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
index 8f3f0da402..ec40b9e9d0 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/execution/config/executor/ClusterConfigTaskExecutor.java
@@ -994,13 +994,13 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
           if (e.getType() == TTransportException.TIMED_OUT
               || e.getCause() instanceof SocketTimeoutException) {
             // time out mainly caused by slow execution, wait until
-            tsStatus = RpcUtils.getStatus(TSStatusCode.STILL_EXECUTING_STATUS);
+            tsStatus = RpcUtils.getStatus(TSStatusCode.OVERLAP_WITH_EXISTING_TASK);
           } else {
             throw e;
           }
         }
         // keep waiting until task ends
-      } while (TSStatusCode.STILL_EXECUTING_STATUS.getStatusCode() == tsStatus.getCode());
+      } while (TSStatusCode.OVERLAP_WITH_EXISTING_TASK.getStatusCode() == tsStatus.getCode());
 
       if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) {
         LOGGER.error(
@@ -1078,13 +1078,13 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
           if (e.getType() == TTransportException.TIMED_OUT
               || e.getCause() instanceof SocketTimeoutException) {
             // time out mainly caused by slow execution, wait until
-            tsStatus = RpcUtils.getStatus(TSStatusCode.STILL_EXECUTING_STATUS);
+            tsStatus = RpcUtils.getStatus(TSStatusCode.OVERLAP_WITH_EXISTING_TASK);
           } else {
             throw e;
           }
         }
         // keep waiting until task ends
-      } while (TSStatusCode.STILL_EXECUTING_STATUS.getStatusCode() == tsStatus.getCode());
+      } while (TSStatusCode.OVERLAP_WITH_EXISTING_TASK.getStatusCode() == tsStatus.getCode());
 
       if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) {
         LOGGER.error(
@@ -1294,13 +1294,13 @@ public class ClusterConfigTaskExecutor implements IConfigTaskExecutor {
           if (e.getType() == TTransportException.TIMED_OUT
               || e.getCause() instanceof SocketTimeoutException) {
             // time out mainly caused by slow execution, wait until
-            tsStatus = RpcUtils.getStatus(TSStatusCode.STILL_EXECUTING_STATUS);
+            tsStatus = RpcUtils.getStatus(TSStatusCode.OVERLAP_WITH_EXISTING_TASK);
           } else {
             throw e;
           }
         }
         // keep waiting until task ends
-      } while (TSStatusCode.STILL_EXECUTING_STATUS.getStatusCode() == tsStatus.getCode());
+      } while (TSStatusCode.OVERLAP_WITH_EXISTING_TASK.getStatusCode() == tsStatus.getCode());
 
       if (TSStatusCode.SUCCESS_STATUS.getStatusCode() != tsStatus.getCode()) {
         LOGGER.error(
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/LocalExecutionPlanner.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/LocalExecutionPlanner.java
index 2121d1547e..a08f9af268 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/LocalExecutionPlanner.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/planner/LocalExecutionPlanner.java
@@ -130,7 +130,7 @@ public class LocalExecutionPlanner {
             String.format(
                 "There is not enough memory to execute current fragment instance, current remaining free memory is %d, estimated memory usage for current fragment instance is %d",
                 freeMemoryForOperators, estimatedMemorySize),
-            TSStatusCode.MEMORY_NOT_ENOUGH.getStatusCode());
+            TSStatusCode.MPP_MEMORY_NOT_ENOUGH.getStatusCode());
       } else {
         freeMemoryForOperators -= estimatedMemorySize;
         LOGGER.debug(
diff --git a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneScheduler.java b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneScheduler.java
index 698dff38cc..ebceb0e10b 100644
--- a/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneScheduler.java
+++ b/server/src/main/java/org/apache/iotdb/db/mpp/plan/scheduler/StandaloneScheduler.java
@@ -132,7 +132,7 @@ public class StandaloneScheduler implements IScheduler {
       case WRITE:
         // reject non-query operations when system is read-only
         if (CommonDescriptor.getInstance().getConfig().isReadOnly()) {
-          TSStatus failedStatus = new TSStatus(TSStatusCode.READ_ONLY_SYSTEM.getStatusCode());
+          TSStatus failedStatus = new TSStatus(TSStatusCode.SYSTEM_READ_ONLY.getStatusCode());
           failedStatus.setMessage("Fail to do non-query operations because system is read-only.");
           stateMachine.transitionToFailed(failedStatus);
           return;
diff --git a/server/src/main/java/org/apache/iotdb/db/protocol/rest/filter/AuthorizationFilter.java b/server/src/main/java/org/apache/iotdb/db/protocol/rest/filter/AuthorizationFilter.java
index f9c774fa2a..58cf062275 100644
--- a/server/src/main/java/org/apache/iotdb/db/protocol/rest/filter/AuthorizationFilter.java
+++ b/server/src/main/java/org/apache/iotdb/db/protocol/rest/filter/AuthorizationFilter.java
@@ -108,8 +108,8 @@ public class AuthorizationFilter implements ContainerRequestFilter {
               .type(MediaType.APPLICATION_JSON)
               .entity(
                   new ExecutionStatus()
-                      .code(TSStatusCode.SYSTEM_CHECK_ERROR.getStatusCode())
-                      .message(TSStatusCode.SYSTEM_CHECK_ERROR.name()))
+                      .code(TSStatusCode.AUTHENTICATION_ERROR.getStatusCode())
+                      .message(TSStatusCode.AUTHENTICATION_ERROR.name()))
               .build();
       containerRequestContext.abortWith(resp);
       return null;
diff --git a/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/GrafanaApiServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/GrafanaApiServiceImpl.java
index 5b8449a211..fbba149e66 100644
--- a/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/GrafanaApiServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/GrafanaApiServiceImpl.java
@@ -125,7 +125,7 @@ public class GrafanaApiServiceImpl extends GrafanaApiService {
               SCHEMA_FETCHER,
               config.getQueryTimeoutThreshold());
       if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         return Response.ok()
             .entity(
                 new ExecutionStatus()
@@ -188,7 +188,7 @@ public class GrafanaApiServiceImpl extends GrafanaApiService {
               SCHEMA_FETCHER,
               config.getQueryTimeoutThreshold());
       if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         return Response.ok()
             .entity(
                 new ExecutionStatus()
@@ -245,7 +245,7 @@ public class GrafanaApiServiceImpl extends GrafanaApiService {
                 SCHEMA_FETCHER,
                 config.getQueryTimeoutThreshold());
         if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-            && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+            && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
           return Response.ok()
               .entity(
                   new ExecutionStatus()
diff --git a/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/RestApiServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/RestApiServiceImpl.java
index 65431a95af..4892e13da7 100644
--- a/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/RestApiServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/protocol/rest/impl/RestApiServiceImpl.java
@@ -113,7 +113,7 @@ public class RestApiServiceImpl extends RestApiService {
       return Response.ok()
           .entity(
               (result.status.code == TSStatusCode.SUCCESS_STATUS.getStatusCode()
-                      || result.status.code == TSStatusCode.NEED_REDIRECTION.getStatusCode())
+                      || result.status.code == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode())
                   ? new ExecutionStatus()
                       .code(TSStatusCode.SUCCESS_STATUS.getStatusCode())
                       .message(TSStatusCode.SUCCESS_STATUS.name())
@@ -160,7 +160,7 @@ public class RestApiServiceImpl extends RestApiService {
               SCHEMA_FETCHER,
               config.getQueryTimeoutThreshold());
       if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         return Response.ok()
             .entity(
                 new ExecutionStatus()
@@ -208,7 +208,7 @@ public class RestApiServiceImpl extends RestApiService {
       return Response.ok()
           .entity(
               (result.status.code == TSStatusCode.SUCCESS_STATUS.getStatusCode()
-                      || result.status.code == TSStatusCode.NEED_REDIRECTION.getStatusCode())
+                      || result.status.code == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode())
                   ? new ExecutionStatus()
                       .code(TSStatusCode.SUCCESS_STATUS.getStatusCode())
                       .message(TSStatusCode.SUCCESS_STATUS.name())
diff --git a/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java b/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java
index f7cc96b676..68cc811b6e 100644
--- a/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/query/control/SessionManager.java
@@ -129,7 +129,7 @@ public class SessionManager implements SessionManagerMBean {
       LOGGER.error("Failed to connect to ConfigNode, because ", e);
       openSessionResp
           .sessionId(-1)
-          .setCode(TSStatusCode.AUTHENTICATION_FAILED.getStatusCode())
+          .setCode(TSStatusCode.AUTHENTICATION_ERROR.getStatusCode())
           .setMessage(e.getMessage());
     }
 
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
index 27646db877..43515a61f2 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/ClientRPCServiceImpl.java
@@ -222,7 +222,7 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
               req.getTimeout());
 
       if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         return RpcUtils.getTSExecuteStatementResp(result.status);
       }
 
@@ -1518,7 +1518,7 @@ public class ClientRPCServiceImpl implements IClientRPCServiceWithHandler {
               config.getQueryTimeoutThreshold());
 
       if (executionResult.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && executionResult.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && executionResult.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         resp.setStatus(executionResult.status);
         return resp;
       }
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java
index a3e4266ec1..58a77d76a1 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeInternalRPCServiceImpl.java
@@ -879,7 +879,7 @@ public class DataNodeInternalRPCServiceImpl implements IDataNodeRPCService.Iface
               req.getTimeout());
 
       if (result.status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && result.status.code != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && result.status.code != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         return result.status;
       }
 
@@ -1299,7 +1299,7 @@ public class DataNodeInternalRPCServiceImpl implements IDataNodeRPCService.Iface
       UDFManagementService.getInstance().register(udfInformation, req.jarFile);
       return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
     } catch (Exception e) {
-      return new TSStatus(TSStatusCode.CREATE_FUNCTION_ON_DATANODE_ERROR.getStatusCode())
+      return new TSStatus(TSStatusCode.CREATE_UDF_ON_DATANODE_ERROR.getStatusCode())
           .setMessage(e.getMessage());
     }
   }
@@ -1310,7 +1310,7 @@ public class DataNodeInternalRPCServiceImpl implements IDataNodeRPCService.Iface
       UDFManagementService.getInstance().deregister(req.getFunctionName(), req.isNeedToDeleteJar());
       return new TSStatus(TSStatusCode.SUCCESS_STATUS.getStatusCode());
     } catch (Exception e) {
-      return new TSStatus(TSStatusCode.DROP_FUNCTION_ON_DATANODE_ERROR.getStatusCode())
+      return new TSStatus(TSStatusCode.DROP_UDF_ON_DATANODE_ERROR.getStatusCode())
           .setMessage(e.getMessage());
     }
   }
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeRegionManager.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeRegionManager.java
index 18b56fceb5..0f892bf519 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeRegionManager.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/DataNodeRegionManager.java
@@ -128,7 +128,7 @@ public class DataNodeRegionManager {
       }
     } catch (IllegalPathException e1) {
       LOGGER.error("Create Schema Region {} failed because path is illegal.", storageGroup);
-      tsStatus = new TSStatus(TSStatusCode.PATH_ILLEGAL.getStatusCode());
+      tsStatus = new TSStatus(TSStatusCode.ILLEGAL_PATH.getStatusCode());
       tsStatus.setMessage("Create Schema Region failed because storageGroup path is illegal.");
     } catch (MetadataException e2) {
       LOGGER.error("Create Schema Region {} failed because {}", storageGroup, e2.getMessage());
diff --git a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
index d086f5ba57..b217450312 100644
--- a/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
+++ b/server/src/main/java/org/apache/iotdb/db/service/thrift/impl/TSServiceImpl.java
@@ -733,7 +733,7 @@ public class TSServiceImpl implements IClientRPCServiceWithHandler {
         port);
     TSStatus status = new TSStatus();
     status.setRedirectNode(new TEndPoint(ip, port));
-    status.setCode(TSStatusCode.NEED_REDIRECTION.getStatusCode());
+    status.setCode(TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode());
     resp.setStatus(status);
     resp.setQueryId(context.getQueryId());
     return resp;
diff --git a/server/src/main/java/org/apache/iotdb/db/tools/WalChecker.java b/server/src/main/java/org/apache/iotdb/db/tools/WalChecker.java
index 724bd75fbc..bc4f9247ab 100644
--- a/server/src/main/java/org/apache/iotdb/db/tools/WalChecker.java
+++ b/server/src/main/java/org/apache/iotdb/db/tools/WalChecker.java
@@ -20,9 +20,9 @@ package org.apache.iotdb.db.tools;
 
 import org.apache.iotdb.commons.exception.IllegalPathException;
 import org.apache.iotdb.commons.file.SystemFileFactory;
-import org.apache.iotdb.db.exception.SystemCheckException;
 import org.apache.iotdb.db.wal.buffer.WALEntry;
 import org.apache.iotdb.db.wal.buffer.WALEntryType;
+import org.apache.iotdb.db.wal.exception.WALException;
 import org.apache.iotdb.db.wal.utils.WALFileUtils;
 
 import org.slf4j.Logger;
@@ -54,13 +54,13 @@ public class WalChecker {
    * check the root wal dir and find the damaged files
    *
    * @return a list of damaged files.
-   * @throws SystemCheckException if the root wal dir does not exist.
+   * @throws WALException if the root wal dir does not exist.
    */
-  public List<File> doCheck() throws SystemCheckException {
+  public List<File> doCheck() throws WALException {
     File walFolderFile = SystemFileFactory.INSTANCE.getFile(walFolder);
     logger.info("Checking folder: {}", walFolderFile.getAbsolutePath());
     if (!walFolderFile.exists() || !walFolderFile.isDirectory()) {
-      throw new SystemCheckException(walFolder);
+      throw new WALException(walFolder);
     }
 
     File[] walNodeFolders = walFolderFile.listFiles(File::isDirectory);
@@ -115,7 +115,7 @@ public class WalChecker {
   }
 
   /** @param args walRootDirectory */
-  public static void main(String[] args) throws SystemCheckException {
+  public static void main(String[] args) throws WALException {
     if (args.length < 1) {
       logger.error("No enough args: require the walRootDirectory");
       return;
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 e01a94ab79..782c990c59 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
@@ -80,7 +80,7 @@ public class ErrorHandlingUtils {
     TSStatus status = tryCatchQueryException(e);
     if (status != null) {
       // ignore logging sg not ready exception
-      if (status.getCode() != TSStatusCode.DATABASE_NOT_READY.getStatusCode()) {
+      if (status.getCode() != TSStatusCode.STORAGE_ENGINE_NOT_READY.getStatusCode()) {
         String message =
             String.format(
                 "Status code: %s, Query Statement: %s failed", status.getCode(), operation);
@@ -108,12 +108,12 @@ public class ErrorHandlingUtils {
     Throwable rootCause = getRootCause(e);
     // ignore logging sg not ready exception
     if (rootCause instanceof StorageGroupNotReadyException) {
-      return RpcUtils.getStatus(TSStatusCode.DATABASE_NOT_READY, rootCause.getMessage());
+      return RpcUtils.getStatus(TSStatusCode.STORAGE_ENGINE_NOT_READY, rootCause.getMessage());
     }
 
     Throwable t = e instanceof ExecutionException ? e.getCause() : e;
     if (t instanceof QueryTimeoutRuntimeException) {
-      return RpcUtils.getStatus(TSStatusCode.TIME_OUT, rootCause.getMessage());
+      return RpcUtils.getStatus(TSStatusCode.INTERNAL_REQUEST_TIME_OUT, rootCause.getMessage());
     } else if (t instanceof ParseCancellationException) {
       return RpcUtils.getStatus(
           TSStatusCode.SQL_PARSE_ERROR, INFO_PARSING_SQL_ERROR + rootCause.getMessage());
@@ -159,7 +159,7 @@ public class ErrorHandlingUtils {
       BatchProcessException batchException = (BatchProcessException) e;
       // ignore logging sg not ready exception
       for (TSStatus status : batchException.getFailingStatus()) {
-        if (status.getCode() == TSStatusCode.DATABASE_NOT_READY.getStatusCode()) {
+        if (status.getCode() == TSStatusCode.STORAGE_ENGINE_NOT_READY.getStatusCode()) {
           return RpcUtils.getStatus(Arrays.asList(batchException.getFailingStatus()));
         }
       }
diff --git a/server/src/main/java/org/apache/iotdb/db/wal/exception/WALException.java b/server/src/main/java/org/apache/iotdb/db/wal/exception/WALException.java
index 8f2ccebf21..ac0c666875 100644
--- a/server/src/main/java/org/apache/iotdb/db/wal/exception/WALException.java
+++ b/server/src/main/java/org/apache/iotdb/db/wal/exception/WALException.java
@@ -23,16 +23,16 @@ import org.apache.iotdb.rpc.TSStatusCode;
 
 public class WALException extends IoTDBException {
   public WALException(Throwable cause) {
-    super(cause, TSStatusCode.WRITE_AHEAD_LOG_ERROR.getStatusCode());
+    super(cause, TSStatusCode.WAL_ERROR.getStatusCode());
     this.initCause(cause);
   }
 
   public WALException(String msg) {
-    super(msg, TSStatusCode.WRITE_AHEAD_LOG_ERROR.getStatusCode());
+    super(msg, TSStatusCode.WAL_ERROR.getStatusCode());
   }
 
   public WALException(String message, Throwable cause) {
-    super(message + cause.getMessage(), TSStatusCode.WRITE_AHEAD_LOG_ERROR.getStatusCode());
+    super(message + cause.getMessage(), TSStatusCode.WAL_ERROR.getStatusCode());
     this.initCause(cause);
   }
 }
diff --git a/server/src/test/java/org/apache/iotdb/db/tools/WalCheckerTest.java b/server/src/test/java/org/apache/iotdb/db/tools/WalCheckerTest.java
index 2019dbe99b..6ada22b36c 100644
--- a/server/src/test/java/org/apache/iotdb/db/tools/WalCheckerTest.java
+++ b/server/src/test/java/org/apache/iotdb/db/tools/WalCheckerTest.java
@@ -21,9 +21,9 @@ package org.apache.iotdb.db.tools;
 
 import org.apache.iotdb.commons.exception.IllegalPathException;
 import org.apache.iotdb.db.constant.TestConstant;
-import org.apache.iotdb.db.exception.SystemCheckException;
 import org.apache.iotdb.db.wal.buffer.WALEntry;
 import org.apache.iotdb.db.wal.buffer.WALInfoEntry;
+import org.apache.iotdb.db.wal.exception.WALException;
 import org.apache.iotdb.db.wal.io.ILogWriter;
 import org.apache.iotdb.db.wal.io.WALFileTest;
 import org.apache.iotdb.db.wal.io.WALWriter;
@@ -53,14 +53,14 @@ public class WalCheckerTest {
     boolean caught = false;
     try {
       checker.doCheck();
-    } catch (SystemCheckException e) {
+    } catch (WALException e) {
       caught = true;
     }
     assertTrue(caught);
   }
 
   @Test
-  public void testEmpty() throws IOException, SystemCheckException {
+  public void testEmpty() throws IOException, WALException {
     File tempRoot = new File(TestConstant.BASE_OUTPUT_PATH.concat("root"));
     tempRoot.mkdir();
 
@@ -73,7 +73,7 @@ public class WalCheckerTest {
   }
 
   @Test
-  public void testNormalCheck() throws IOException, SystemCheckException, IllegalPathException {
+  public void testNormalCheck() throws IOException, WALException, IllegalPathException {
     File tempRoot = new File(TestConstant.BASE_OUTPUT_PATH.concat("wal"));
     tempRoot.mkdir();
 
@@ -112,7 +112,7 @@ public class WalCheckerTest {
   }
 
   @Test
-  public void testAbnormalCheck() throws IOException, SystemCheckException, IllegalPathException {
+  public void testAbnormalCheck() throws IOException, WALException, IllegalPathException {
     File tempRoot = new File(TestConstant.BASE_OUTPUT_PATH.concat("wal"));
     tempRoot.mkdir();
 
@@ -156,7 +156,7 @@ public class WalCheckerTest {
   }
 
   @Test
-  public void testOneDamagedCheck() throws IOException, SystemCheckException {
+  public void testOneDamagedCheck() throws IOException, WALException {
     File tempRoot = new File(TestConstant.BASE_OUTPUT_PATH.concat("wal"));
     tempRoot.mkdir();
 
diff --git a/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java b/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java
index 89c9a21c4a..1c2d64e092 100644
--- a/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java
+++ b/service-rpc/src/main/java/org/apache/iotdb/rpc/RpcUtils.java
@@ -89,7 +89,7 @@ public class RpcUtils {
       verifySuccess(status.getSubStatus());
       return;
     }
-    if (status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+    if (status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       return;
     }
     if (status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
@@ -103,7 +103,7 @@ public class RpcUtils {
    * @param status -status
    */
   public static void verifySuccess(InfluxTSStatus status) throws StatementExecutionException {
-    if (status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+    if (status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       return;
     }
     if (status.code != TSStatusCode.SUCCESS_STATUS.getStatusCode()) {
@@ -123,7 +123,7 @@ public class RpcUtils {
       TSStatus status, List<String> devices) throws StatementExecutionException, RedirectException {
     verifySuccess(status);
     if (status.getCode() == TSStatusCode.MULTIPLE_ERROR.getStatusCode()
-        || status.getCode() == TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+        || status.getCode() == TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
       Map<String, TEndPoint> deviceEndPointMap = new HashMap<>();
       List<TSStatus> statusSubStatus = status.getSubStatus();
       for (int i = 0; i < statusSubStatus.size(); i++) {
@@ -141,7 +141,7 @@ public class RpcUtils {
         new StringBuilder().append(TSStatusCode.MULTIPLE_ERROR.getStatusCode()).append(": ");
     for (TSStatus status : statuses) {
       if (status.getCode() != TSStatusCode.SUCCESS_STATUS.getStatusCode()
-          && status.getCode() != TSStatusCode.NEED_REDIRECTION.getStatusCode()) {
+          && status.getCode() != TSStatusCode.REDIRECTION_RECOMMEND.getStatusCode()) {
         errMsgs.append(status.getMessage()).append("; ");
       }
     }
diff --git a/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java b/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
index 93ea68ea68..3068ede11f 100644
--- a/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
+++ b/service-rpc/src/main/java/org/apache/iotdb/rpc/TSStatusCode.java
@@ -31,140 +31,145 @@ import java.util.Map;
  */
 public enum TSStatusCode {
   SUCCESS_STATUS(200),
-  STILL_EXECUTING_STATUS(201),
-  INCOMPATIBLE_VERSION(203),
-
-  NODE_DELETE_ERROR(298),
-  ALIAS_ALREADY_EXIST(299),
-  PATH_ALREADY_EXIST(300),
-  METADATA_ERROR(303),
-  PATH_NOT_EXIST(304),
-  OUT_OF_TTL(305),
-  COMPACTION_ERROR(307),
-  SYSTEM_CHECK_ERROR(308),
-  SYNC_CONNECTION_ERROR(310),
-  DATABASE_PROCESS_ERROR(311),
-  STORAGE_ENGINE_ERROR(313),
-  TSFILE_PROCESSOR_ERROR(314),
-  PATH_ILLEGAL(315),
-  LOAD_FILE_ERROR(316),
-  DATABASE_NOT_READY(317),
-  ILLEGAL_PARAMETER(318),
-  ALIGNED_TIMESERIES_ERROR(319),
-  DUPLICATED_TEMPLATE(320),
-  UNDEFINED_TEMPLATE(321),
-  DATABASE_NOT_EXIST(322),
-  CONTINUOUS_QUERY_ERROR(323),
-  TEMPLATE_NOT_SET(324),
-  DIFFERENT_TEMPLATE(325),
-  TEMPLATE_IS_IN_USE(326),
-  TEMPLATE_INCOMPATIBLE(327),
-  SEGMENT_NOT_FOUND(328),
-  PAGE_OUT_OF_SPACE(329),
-  RECORD_DUPLICATED(330),
-  SEGMENT_OUT_OF_SPACE(331),
-  SCHEMA_FILE_NOT_EXISTS(332),
-  WRITE_AHEAD_LOG_ERROR(333),
-  CREATE_PIPE_SINK_ERROR(334),
-  PIPE_ERROR(335),
-  PIPESERVER_ERROR(336),
-  SERIES_OVERFLOW(337),
-  TIMESERIES_ALREADY_EXIST(338),
-  CREATE_TEMPLATE_ERROR(340),
-  SYNC_FILE_REDIRECTION_ERROR(341),
-  SYNC_FILE_ERROR(342),
-  VERIFY_METADATA_ERROR(343),
-  TIMESERIES_IN_BLACK_LIST(344),
-  OVERSIZE_RECORD(349),
-  SCHEMA_FILE_REDO_LOG_BROKEN(350),
-  TRIGGER_FIRE_ERROR(355),
-  TRIGGER_LOAD_CLASS_ERROR(360),
-  TRIGGER_DOWNLOAD_ERROR(361),
-  CREATE_TRIGGER_INSTANCE_ERROR(362),
-  ACTIVE_TRIGGER_INSTANCE_ERROR(363),
-  DROP_TRIGGER_INSTANCE_ERROR(364),
-  UPDATE_TRIGGER_LOCATION_ERROR(365),
-  TEMPLATE_NOT_ACTIVATED(366),
-
-  UDF_LOAD_CLASS_ERROR(370),
-  UDF_DOWNLOAD_ERROR(371),
-  CREATE_FUNCTION_ON_DATANODE_ERROR(372),
-  DROP_FUNCTION_ON_DATANODE_ERROR(373),
-
-  EXECUTE_STATEMENT_ERROR(400),
-  SQL_PARSE_ERROR(401),
-  GENERATE_TIME_ZONE_ERROR(402),
-  SET_TIME_ZONE_ERROR(403),
-  QUERY_NOT_ALLOWED(405),
-  LOGICAL_OPERATOR_ERROR(407),
-  LOGICAL_OPTIMIZE_ERROR(408),
-  UNSUPPORTED_FILL_TYPE(409),
-  QUERY_PROCESS_ERROR(411),
-  WRITE_PROCESS_ERROR(412),
-  WRITE_PROCESS_REJECT(413),
-  SEMANTIC_ERROR(416),
-  LOAD_PIECE_OF_TSFILE_ERROR(417),
-
-  UNSUPPORTED_INDEX_TYPE(422),
-
-  MEMORY_NOT_ENOUGH(423),
-
-  INTERNAL_SERVER_ERROR(500),
-  CLOSE_OPERATION_ERROR(501),
-  READ_ONLY_SYSTEM(502),
-  DISK_SPACE_INSUFFICIENT(503),
-  START_UP_ERROR(504),
-  SHUT_DOWN_ERROR(505),
-  MULTIPLE_ERROR(506),
-  TSBLOCK_SERIALIZE_ERROR(508),
-
-  WRONG_LOGIN_PASSWORD(600),
-  NOT_LOGIN(601),
-  NO_PERMISSION(602),
-  UNINITIALIZED_AUTH_ERROR(603),
-  EXECUTE_PERMISSION_ERROR(604),
-  USER_NOT_EXIST(605),
-  ROLE_NOT_EXIST(606),
-  AUTHENTICATION_FAILED(607),
-  CLEAR_PERMISSION_CACHE_ERROR(608),
-
-  // cluster-related errors
-  TIME_OUT(701),
-  UNSUPPORTED_OPERATION(703),
-  NO_CONNECTION(706),
-  NEED_REDIRECTION(707),
-  ALL_RETRY_ERROR(709),
-  MIGRATE_REGION_ERROR(710),
-  CREATE_REGION_ERROR(711),
-  DELETE_REGION_ERROR(712),
-  PARTITION_CACHE_UPDATE_ERROR(713),
-  DESERIALIZE_PIECE_OF_TSFILE_ERROR(714),
-  CONSENSUS_NOT_INITIALIZED(715),
-
-  // configuration
-  CONFIGURATION_ERROR(800),
-
-  // ConfigNode response
-  DATANODE_ALREADY_REGISTERED(901),
-  DATABASE_ALREADY_EXISTS(903),
-  NO_ENOUGH_DATANODE(904),
-  ERROR_GLOBAL_CONFIG(905),
-  ADD_CONFIGNODE_ERROR(906),
-  REMOVE_CONFIGNODE_ERROR(907),
-  DATANODE_NOT_EXIST(912),
-  DATANODE_STOP_ERROR(917),
-  REGION_LEADER_CHANGE_ERROR(918),
-  REMOVE_DATANODE_ERROR(919),
-  OVERLAP_WITH_EXISTING_TASK(920),
-  NOT_AVAILABLE_REGION_GROUP(921),
-  CREATE_TRIGGER_ERROR(922),
-  DROP_TRIGGER_ERROR(923),
-  REGISTER_REMOVED_DATANODE(925),
-
-  NO_SUCH_CQ(930),
-  CQ_ALREADY_ACTIVE(931),
-  CQ_AlREADY_EXIST(932),
-  CQ_UPDATE_LAST_EXEC_TIME_ERROR(933);
+
+  // System level
+  INCOMPATIBLE_VERSION(201),
+  CONFIGURATION_ERROR(202),
+  START_UP_ERROR(203),
+  SHUT_DOWN_ERROR(204),
+
+  // General Error
+  UNSUPPORTED_OPERATION(300),
+  EXECUTE_STATEMENT_ERROR(301),
+  MULTIPLE_ERROR(302),
+  ILLEGAL_PARAMETER(303),
+  OVERLAP_WITH_EXISTING_TASK(304),
+  INTERNAL_SERVER_ERROR(305),
+
+  // Client,
+  REDIRECTION_RECOMMEND(400),
+
+  // Schema Engine
+  DATABASE_NOT_EXIST(500),
+  DATABASE_ALREADY_EXISTS(501),
+  SERIES_OVERFLOW(502),
+  TIMESERIES_ALREADY_EXIST(503),
+  TIMESERIES_IN_BLACK_LIST(504),
+  ALIAS_ALREADY_EXIST(505),
+  PATH_ALREADY_EXIST(506),
+  METADATA_ERROR(507),
+  PATH_NOT_EXIST(508),
+  ILLEGAL_PATH(509),
+  CREATE_TEMPLATE_ERROR(510),
+  DUPLICATED_TEMPLATE(511),
+  UNDEFINED_TEMPLATE(512),
+  TEMPLATE_NOT_SET(513),
+  DIFFERENT_TEMPLATE(514),
+  TEMPLATE_IS_IN_USE(515),
+  TEMPLATE_INCOMPATIBLE(516),
+  SEGMENT_NOT_FOUND(517),
+  PAGE_OUT_OF_SPACE(518),
+  RECORD_DUPLICATED(519),
+  SEGMENT_OUT_OF_SPACE(520),
+  SCHEMA_FILE_NOT_EXISTS(521),
+  OVERSIZE_RECORD(522),
+  SCHEMA_FILE_REDO_LOG_BROKEN(523),
+  TEMPLATE_NOT_ACTIVATED(524),
+
+  // Storage Engine
+  SYSTEM_READ_ONLY(600),
+  STORAGE_ENGINE_ERROR(601),
+  STORAGE_ENGINE_NOT_READY(602),
+  DATAREGION_PROCESS_ERROR(603),
+  TSFILE_PROCESSOR_ERROR(604),
+  WRITE_PROCESS_ERROR(605),
+  WRITE_PROCESS_REJECT(606),
+  OUT_OF_TTL(607),
+  COMPACTION_ERROR(608),
+  ALIGNED_TIMESERIES_ERROR(609),
+  WAL_ERROR(610),
+  DISK_SPACE_INSUFFICIENT(611),
+
+  // Query Engine
+  SQL_PARSE_ERROR(700),
+  SEMANTIC_ERROR(701),
+  GENERATE_TIME_ZONE_ERROR(702),
+  SET_TIME_ZONE_ERROR(703),
+  QUERY_NOT_ALLOWED(704),
+  LOGICAL_OPERATOR_ERROR(705),
+  LOGICAL_OPTIMIZE_ERROR(706),
+  UNSUPPORTED_FILL_TYPE(707),
+  QUERY_PROCESS_ERROR(708),
+  MPP_MEMORY_NOT_ENOUGH(709),
+  CLOSE_OPERATION_ERROR(710),
+  TSBLOCK_SERIALIZE_ERROR(711),
+  INTERNAL_REQUEST_TIME_OUT(712),
+  INTERNAL_REQUEST_RETRY_ERROR(713),
+
+  // Authentication
+  AUTHENTICATION_ERROR(800),
+  WRONG_LOGIN_PASSWORD(801),
+  NOT_LOGIN(802),
+  NO_PERMISSION(803),
+  UNINITIALIZED_AUTH_ERROR(804),
+  USER_NOT_EXIST(805),
+  ROLE_NOT_EXIST(806),
+  CLEAR_PERMISSION_CACHE_ERROR(807),
+
+  // Partition Error
+  MIGRATE_REGION_ERROR(900),
+  CREATE_REGION_ERROR(901),
+  DELETE_REGION_ERROR(902),
+  PARTITION_CACHE_UPDATE_ERROR(903),
+  CONSENSUS_NOT_INITIALIZED(904),
+  REGION_LEADER_CHANGE_ERROR(905),
+  NO_AVAILABLE_REGION_GROUP(906),
+
+  // Cluster Manager
+  ADD_CONFIGNODE_ERROR(1000),
+  REMOVE_CONFIGNODE_ERROR(1001),
+  DATANODE_ALREADY_REGISTERED(1002),
+  NO_ENOUGH_DATANODE(1003),
+  DATANODE_NOT_EXIST(1004),
+  DATANODE_STOP_ERROR(1005),
+  REMOVE_DATANODE_ERROR(1006),
+  REGISTER_REMOVED_DATANODE(1007),
+  CAN_NOT_CONNECT_DATANODE(1008),
+
+  // Sync, Load TsFile
+  LOAD_FILE_ERROR(1100),
+  LOAD_PIECE_OF_TSFILE_ERROR(1101),
+  DESERIALIZE_PIECE_OF_TSFILE_ERROR(1102),
+  SYNC_CONNECTION_ERROR(1103),
+  SYNC_FILE_REDIRECTION_ERROR(1104),
+  SYNC_FILE_ERROR(1105),
+  CREATE_PIPE_SINK_ERROR(1106),
+  PIPE_ERROR(1107),
+  PIPESERVER_ERROR(1108),
+  VERIFY_METADATA_ERROR(1109),
+
+  // UDF
+  UDF_LOAD_CLASS_ERROR(1200),
+  UDF_DOWNLOAD_ERROR(1201),
+  CREATE_UDF_ON_DATANODE_ERROR(1202),
+  DROP_UDF_ON_DATANODE_ERROR(1203),
+
+  // Trigger
+  CREATE_TRIGGER_ERROR(1300),
+  DROP_TRIGGER_ERROR(1301),
+  TRIGGER_FIRE_ERROR(1302),
+  TRIGGER_LOAD_CLASS_ERROR(1303),
+  TRIGGER_DOWNLOAD_ERROR(1304),
+  CREATE_TRIGGER_INSTANCE_ERROR(1305),
+  ACTIVE_TRIGGER_INSTANCE_ERROR(1306),
+  DROP_TRIGGER_INSTANCE_ERROR(1307),
+  UPDATE_TRIGGER_LOCATION_ERROR(1308),
+
+  // Continuous Query
+  NO_SUCH_CQ(1400),
+  CQ_ALREADY_ACTIVE(1401),
+  CQ_AlREADY_EXIST(1402),
+  CQ_UPDATE_LAST_EXEC_TIME_ERROR(1403);
 
   private final int statusCode;