diff --git a/.jenkins/modules/Regression/PythonRegression.groovy b/.jenkins/modules/Regression/PythonRegression.groovy
index 3f2f4ed86661a99a5e24685312f2627b39b71366..e9fa07045868169faa90060cf45eb97f804960c4 100644
--- a/.jenkins/modules/Regression/PythonRegression.groovy
+++ b/.jenkins/modules/Regression/PythonRegression.groovy
@@ -76,11 +76,11 @@ timeout(time: "${regressionTimeout}", unit: 'MINUTES') {
 
                 sh "mkdir -p ${env.DEV_TEST_ARTIFACTS_PATH}"
                 sh "kubectl cp -n ${env.HELM_RELEASE_NAMESPACE} \$(kubectl get pod -n ${env.HELM_RELEASE_NAMESPACE} -l ${milvusLabels} -o jsonpath='{range.items[0]}{.metadata.name}'):logs ${env.DEV_TEST_ARTIFACTS_PATH}"
-                sh "kubectl logs -n ${env.HELM_RELEASE_NAMESPACE} \$(kubectl get pod -n ${env.HELM_RELEASE_NAMESPACE} -l ${etcdLabels} -o jsonpath='{range.items[*]}{.metadata.name} ') > ${env.DEV_TEST_ARTIFACTS_PATH}/etcd-${REGRESSION_SERVICE_TYPE}.log"
-                sh "kubectl logs -n ${env.HELM_RELEASE_NAMESPACE} \$(kubectl get pod -n ${env.HELM_RELEASE_NAMESPACE} -l ${minioLables} -o jsonpath='{range.items[*]}{.metadata.name} ') > ${env.DEV_TEST_ARTIFACTS_PATH}/minio-${REGRESSION_SERVICE_TYPE}.log"
-                // if ("${REGRESSION_SERVICE_TYPE}" == "distributed") {
-                //     sh "kubectl logs -n ${env.HELM_RELEASE_NAMESPACE} \$(kubectl get pod -n ${env.HELM_RELEASE_NAMESPACE} -l ${pulsarLabels} -o jsonpath='{range.items[*]}{.metadata.name} ') > ${env.DEV_TEST_ARTIFACTS_PATH}/pulsar-${REGRESSION_SERVICE_TYPE}.log"
-                // }
+                sh "kubectl logs --all-containers=true -n ${env.HELM_RELEASE_NAMESPACE} -l ${etcdLabels} > ${env.DEV_TEST_ARTIFACTS_PATH}/etcd-${REGRESSION_SERVICE_TYPE}.log"
+                sh "kubectl logs --all-containers=true -n ${env.HELM_RELEASE_NAMESPACE} -l ${minioLables} > ${env.DEV_TEST_ARTIFACTS_PATH}/minio-${REGRESSION_SERVICE_TYPE}.log"
+                if ("${REGRESSION_SERVICE_TYPE}" == "distributed") {
+                    sh "kubectl logs --all-containers=true -n ${env.HELM_RELEASE_NAMESPACE} -l ${pulsarLabels} > ${env.DEV_TEST_ARTIFACTS_PATH}/pulsar-${REGRESSION_SERVICE_TYPE}.log"
+                }
                 archiveArtifacts artifacts: "${env.DEV_TEST_ARTIFACTS_PATH}/**", allowEmptyArchive: true
             }
         }
diff --git a/internal/core/bench/bench_indexbuilder.cpp b/internal/core/bench/bench_indexbuilder.cpp
index f9731e51c5879646ef093fe2545fa1ab65bb5089..fc9aae312096bb57e4c4671dba9fe1792d769d43 100644
--- a/internal/core/bench/bench_indexbuilder.cpp
+++ b/internal/core/bench/bench_indexbuilder.cpp
@@ -64,7 +64,7 @@ IndexBuilder_build(benchmark::State& state) {
 
     for (auto _ : state) {
         auto index =
-                std::make_unique<milvus::indexbuilder::IndexWrapper>(type_params_str.c_str(), index_params_str.c_str());
+            std::make_unique<milvus::indexbuilder::IndexWrapper>(type_params_str.c_str(), index_params_str.c_str());
         index->BuildWithoutIds(xb_dataset);
     }
 }
@@ -93,7 +93,7 @@ IndexBuilder_build_and_codec(benchmark::State& state) {
 
     for (auto _ : state) {
         auto index =
-                std::make_unique<milvus::indexbuilder::IndexWrapper>(type_params_str.c_str(), index_params_str.c_str());
+            std::make_unique<milvus::indexbuilder::IndexWrapper>(type_params_str.c_str(), index_params_str.c_str());
 
         index->BuildWithoutIds(xb_dataset);
         index->Serialize();
diff --git a/internal/core/src/CMakeLists.txt b/internal/core/src/CMakeLists.txt
index fb68888b295fdd9ae011275fb6549e2758165dfa..43369c24dae99e56411bb2dd35fb5bcdf56c28a1 100644
--- a/internal/core/src/CMakeLists.txt
+++ b/internal/core/src/CMakeLists.txt
@@ -23,6 +23,7 @@ foreach (DIR ${INDEX_INCLUDE_DIRS})
 endforeach ()
 
 
+add_subdirectory( exceptions )
 add_subdirectory( utils )
 add_subdirectory( log )
 add_subdirectory( pb )
diff --git a/internal/core/src/common/FieldMeta.h b/internal/core/src/common/FieldMeta.h
index fa997cf4c05dca65d2a6c7498b74af23049add96..0e4b6ddfc98fa39c78a2270bc43efd8ba927edda 100644
--- a/internal/core/src/common/FieldMeta.h
+++ b/internal/core/src/common/FieldMeta.h
@@ -12,7 +12,7 @@
 #pragma once
 #include "common/Types.h"
 #include "utils/Status.h"
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include <string>
 #include <stdexcept>
 #include <optional>
diff --git a/internal/core/src/common/SystemProperty.cpp b/internal/core/src/common/SystemProperty.cpp
index 2d7902c91467af69701c6f3e0f6f2727b0738451..701e5c8aef9d0d1cb94d5da7c0f4d0bfa116f87d 100644
--- a/internal/core/src/common/SystemProperty.cpp
+++ b/internal/core/src/common/SystemProperty.cpp
@@ -10,7 +10,7 @@
 // or implied. See the License for the specific language governing permissions and limitations under the License
 
 #include "common/SystemProperty.h"
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include <yaml-cpp/yaml.h>
 #include "common/Types.h"
 
diff --git a/internal/core/src/common/Types.cpp b/internal/core/src/common/Types.cpp
index 73b704aeee7647f970569d23d34ba1365e7a1279..1e1c2f58a0fd353038d20aa250bb00e1de385e0f 100644
--- a/internal/core/src/common/Types.cpp
+++ b/internal/core/src/common/Types.cpp
@@ -14,7 +14,7 @@
 //
 #include "common/Types.h"
 #include <knowhere/index/vector_index/helpers/IndexParameter.h>
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include <boost/bimap.hpp>
 #include <boost/algorithm/string/case_conv.hpp>
 
diff --git a/internal/core/src/common/type_c.h b/internal/core/src/common/type_c.h
index ff226a63999c6844401a1db79894fb9399c66be1..fcc355f5df72b88774fdef174a9c058da1f6640b 100644
--- a/internal/core/src/common/type_c.h
+++ b/internal/core/src/common/type_c.h
@@ -10,6 +10,7 @@
 // or implied. See the License for the specific language governing permissions and limitations under the License
 
 #pragma once
+#include <stdint.h>
 
 #ifdef __cplusplus
 extern "C" {
@@ -26,7 +27,8 @@ typedef enum SegmentType SegmentType;
 
 enum ErrorCode {
     Success = 0,
-    UnexpectedException = 1,
+    UnexpectedError = 1,
+    IllegalArgument = 5,
 };
 
 typedef struct CStatus {
diff --git a/internal/core/src/exceptions/CMakeLists.txt b/internal/core/src/exceptions/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..1e962ff98e23a071ca606b8d6ee67fe65a27ec46
--- /dev/null
+++ b/internal/core/src/exceptions/CMakeLists.txt
@@ -0,0 +1,6 @@
+set(exceptions_files 
+    EasyAssert.cpp
+)
+
+add_library(milvus_exceptions ${exceptions_files})
+target_link_libraries(milvus_exceptions milvus_proto)
diff --git a/internal/core/src/utils/EasyAssert.cpp b/internal/core/src/exceptions/EasyAssert.cpp
similarity index 77%
rename from internal/core/src/utils/EasyAssert.cpp
rename to internal/core/src/exceptions/EasyAssert.cpp
index 1bc4506d668fedd03571b33cb94b64447f6bd762..b0d24ed93d5b50b0a064aebbcc7c60162323a3df 100644
--- a/internal/core/src/utils/EasyAssert.cpp
+++ b/internal/core/src/exceptions/EasyAssert.cpp
@@ -30,8 +30,13 @@ EasyStackTrace() {
 }
 
 void
-EasyAssertInfo(
-    bool value, std::string_view expr_str, std::string_view filename, int lineno, std::string_view extra_info) {
+EasyAssertInfo(bool value,
+               std::string_view expr_str,
+               std::string_view filename,
+               int lineno,
+               std::string_view extra_info,
+               ErrorCodeEnum error_code) {
+    // enable error code
     if (!value) {
         std::string info;
         info += "Assert \"" + std::string(expr_str) + "\"";
@@ -40,17 +45,17 @@ EasyAssertInfo(
             info += " => " + std::string(extra_info);
         }
 
-        throw std::runtime_error(info + "\n" + EasyStackTrace());
+        throw SegcoreError(error_code, info + "\n" + EasyStackTrace());
     }
 }
 
 [[noreturn]] void
 ThrowWithTrace(const std::exception& exception) {
-    if (typeid(exception) == typeid(WrappedRuntimeError)) {
+    if (typeid(exception) == typeid(SegcoreError)) {
         throw exception;
     }
     auto err_msg = exception.what() + std::string("\n") + EasyStackTrace();
-    throw WrappedRuntimeError(err_msg);
+    throw SegcoreError(ErrorCodeEnum::UnexpectedError, err_msg);
 }
 
 }  // namespace milvus::impl
diff --git a/internal/core/src/utils/EasyAssert.h b/internal/core/src/exceptions/EasyAssert.h
similarity index 65%
rename from internal/core/src/utils/EasyAssert.h
rename to internal/core/src/exceptions/EasyAssert.h
index bf5f5ca729a8658e270f0c952250c4ebd3e90a75..a7ac2bce0f8c589923b3864e49ded55eb5bfc63c 100644
--- a/internal/core/src/utils/EasyAssert.h
+++ b/internal/core/src/exceptions/EasyAssert.h
@@ -15,22 +15,39 @@
 #include <exception>
 #include <stdio.h>
 #include <stdlib.h>
+#include <string>
+#include "pb/common.pb.h"
 
 /* Paste this on the file you want to debug. */
-
 namespace milvus {
+using ErrorCodeEnum = proto::common::ErrorCode;
 namespace impl {
 void
-EasyAssertInfo(
-    bool value, std::string_view expr_str, std::string_view filename, int lineno, std::string_view extra_info);
+EasyAssertInfo(bool value,
+               std::string_view expr_str,
+               std::string_view filename,
+               int lineno,
+               std::string_view extra_info,
+               ErrorCodeEnum error_code = ErrorCodeEnum::UnexpectedError);
 
 [[noreturn]] void
 ThrowWithTrace(const std::exception& exception);
 
 }  // namespace impl
 
-class WrappedRuntimeError : public std::runtime_error {
-    using std::runtime_error::runtime_error;
+class SegcoreError : public std::runtime_error {
+ public:
+    SegcoreError(ErrorCodeEnum error_code, const std::string& error_msg)
+        : error_code_(error_code), std::runtime_error(error_msg) {
+    }
+
+    ErrorCodeEnum
+    get_error_code() {
+        return error_code_;
+    }
+
+ private:
+    ErrorCodeEnum error_code_;
 };
 
 }  // namespace milvus
@@ -50,3 +67,9 @@ class WrappedRuntimeError : public std::runtime_error {
         milvus::impl::EasyAssertInfo(false, (info), __FILE__, __LINE__, ""); \
         __builtin_unreachable();                                             \
     } while (0)
+
+#define PanicCodeInfo(errcode, info)                                                  \
+    do {                                                                              \
+        milvus::impl::EasyAssertInfo(false, (info), __FILE__, __LINE__, "", errcode); \
+        __builtin_unreachable();                                                      \
+    } while (0)
diff --git a/internal/core/src/indexbuilder/IndexWrapper.cpp b/internal/core/src/indexbuilder/IndexWrapper.cpp
index b2f26532ec0615be7a2b2ef0dc2a211b4fca35fc..12b6e90cedd728b1fe21198f5d95d2ee97d8db66 100644
--- a/internal/core/src/indexbuilder/IndexWrapper.cpp
+++ b/internal/core/src/indexbuilder/IndexWrapper.cpp
@@ -16,7 +16,7 @@
 #include "pb/index_cgo_msg.pb.h"
 #include "knowhere/index/vector_index/VecIndexFactory.h"
 #include "knowhere/index/vector_index/helpers/IndexParameter.h"
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "IndexWrapper.h"
 #include "indexbuilder/utils.h"
 #include "index/knowhere/knowhere/index/vector_index/ConfAdapterMgr.h"
diff --git a/internal/core/src/indexbuilder/index_c.cpp b/internal/core/src/indexbuilder/index_c.cpp
index e97ea26cc41b3981b37f4515961ba1003a081912..8cf43c4e70634f355cc5fa2661e3e1c1e62918e6 100644
--- a/internal/core/src/indexbuilder/index_c.cpp
+++ b/internal/core/src/indexbuilder/index_c.cpp
@@ -36,7 +36,7 @@ CreateIndex(const char* serialized_type_params, const char* serialized_index_par
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -60,7 +60,7 @@ BuildFloatVecIndexWithoutIds(CIndex index, int64_t float_value_num, const float*
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -78,7 +78,7 @@ BuildBinaryVecIndexWithoutIds(CIndex index, int64_t data_size, const uint8_t* ve
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -96,7 +96,7 @@ SerializeToSlicedBuffer(CIndex index, CBinary* c_binary) {
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -138,7 +138,7 @@ LoadFromSlicedBuffer(CIndex index, const char* serialized_sliced_blob_buffer, in
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -158,7 +158,7 @@ QueryOnFloatVecIndex(CIndex index, int64_t float_value_num, const float* vectors
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -182,7 +182,7 @@ QueryOnFloatVecIndexWithParam(CIndex index,
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -202,7 +202,7 @@ QueryOnBinaryVecIndex(CIndex index, int64_t data_size, const uint8_t* vectors, C
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -226,7 +226,7 @@ QueryOnBinaryVecIndexWithParam(CIndex index,
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -242,7 +242,7 @@ CreateQueryResult(CIndexQueryResult* res) {
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -288,7 +288,7 @@ DeleteIndexQueryResult(CIndexQueryResult res) {
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
diff --git a/internal/core/src/query/Plan.cpp b/internal/core/src/query/Plan.cpp
index 056910f49bbefcc1e995aae9b412c1fba5c38d75..2690700560d7617dbe1f4a1ad940ca53f43dbd39 100644
--- a/internal/core/src/query/Plan.cpp
+++ b/internal/core/src/query/Plan.cpp
@@ -14,7 +14,7 @@
 #include "query/PlanNode.h"
 #include "query/ExprImpl.h"
 #include "utils/Json.h"
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "pb/milvus.pb.h"
 #include <vector>
 #include <memory>
diff --git a/internal/core/src/query/PlanImpl.h b/internal/core/src/query/PlanImpl.h
index a29c00bc4874e05076373c157fe83859365c8095..b0b74b4c72e0e2410f1f14df85dfb0d05821d0f8 100644
--- a/internal/core/src/query/PlanImpl.h
+++ b/internal/core/src/query/PlanImpl.h
@@ -14,7 +14,7 @@
 #include "Plan.h"
 #include "utils/Json.h"
 #include "PlanNode.h"
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "pb/milvus.pb.h"
 #include <memory>
 #include <map>
diff --git a/internal/core/src/query/SubQueryResult.cpp b/internal/core/src/query/SubQueryResult.cpp
index 660d7b44f2cf2f11103972221b1a0ef1438cd5bc..a5186a40f41acf8d317760230c64391fc50b1ba9 100644
--- a/internal/core/src/query/SubQueryResult.cpp
+++ b/internal/core/src/query/SubQueryResult.cpp
@@ -9,7 +9,7 @@
 // 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
 
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "query/SubQueryResult.h"
 #include "segcore/Reduce.h"
 
diff --git a/internal/core/src/query/generated/ShowExprVisitor.h b/internal/core/src/query/generated/ShowExprVisitor.h
index 6a1ed2646fc641b7670a0c7f100da9ed8408dc06..035fed58186cc568dd66dd69fb08d27d457ee13c 100644
--- a/internal/core/src/query/generated/ShowExprVisitor.h
+++ b/internal/core/src/query/generated/ShowExprVisitor.h
@@ -13,7 +13,7 @@
 // Generated File
 // DO NOT EDIT
 #include "query/Plan.h"
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "utils/Json.h"
 #include <utility>
 #include "ExprVisitor.h"
diff --git a/internal/core/src/query/generated/ShowPlanNodeVisitor.h b/internal/core/src/query/generated/ShowPlanNodeVisitor.h
index c518c3f7d0b23204f804c035db3471bcf08c4831..1bc28c0ce2403a8d159673e376f6f0b837b4c182 100644
--- a/internal/core/src/query/generated/ShowPlanNodeVisitor.h
+++ b/internal/core/src/query/generated/ShowPlanNodeVisitor.h
@@ -12,7 +12,7 @@
 #pragma once
 // Generated File
 // DO NOT EDIT
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "utils/Json.h"
 #include <optional>
 #include <utility>
diff --git a/internal/core/src/query/visitors/ShowExprVisitor.cpp b/internal/core/src/query/visitors/ShowExprVisitor.cpp
index 48e7af1c8605ef0d8371217777695fe9eedba91b..f7bf1256d6de508f6ec407215e5bc51ecc1726cb 100644
--- a/internal/core/src/query/visitors/ShowExprVisitor.cpp
+++ b/internal/core/src/query/visitors/ShowExprVisitor.cpp
@@ -10,7 +10,7 @@
 // or implied. See the License for the specific language governing permissions and limitations under the License
 
 #include "query/Plan.h"
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "utils/Json.h"
 #include <utility>
 #include "query/generated/ShowExprVisitor.h"
diff --git a/internal/core/src/query/visitors/ShowPlanNodeVisitor.cpp b/internal/core/src/query/visitors/ShowPlanNodeVisitor.cpp
index bbbd7df45bbac60147fb29cb41fd7ccbca45e64d..acb97c5a02ad6f9c886b9183f5fea6a6b61e486f 100644
--- a/internal/core/src/query/visitors/ShowPlanNodeVisitor.cpp
+++ b/internal/core/src/query/visitors/ShowPlanNodeVisitor.cpp
@@ -9,7 +9,7 @@
 // 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
 
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "utils/Json.h"
 #include <optional>
 #include <utility>
diff --git a/internal/core/src/query/visitors/VerifyPlanNodeVisitor.cpp b/internal/core/src/query/visitors/VerifyPlanNodeVisitor.cpp
index fed1a445ea4f8800d942713231960f7b13cfda2e..bc1cfde24747a2d8cd41d14b9fad48865b5ba370 100644
--- a/internal/core/src/query/visitors/VerifyPlanNodeVisitor.cpp
+++ b/internal/core/src/query/visitors/VerifyPlanNodeVisitor.cpp
@@ -58,7 +58,7 @@ InferIndexType(const Json& search_params) {
             return key_list.at(key);
         }
     }
-    PanicInfo("failed to infer index type");
+    PanicCodeInfo(ErrorCodeEnum::IllegalArgument, "failed to infer index type");
 }
 
 static knowhere::IndexType
@@ -85,7 +85,9 @@ VerifyPlanNodeVisitor::visit(FloatVectorANNS& node) {
 
     // NOTE: the second parameter is not checked in knowhere, may be redundant
     auto passed = adapter->CheckSearch(params_copy, inferred_type, index_mode);
-    AssertInfo(passed, "invalid search params");
+    if (!passed) {
+        PanicCodeInfo(ErrorCodeEnum::IllegalArgument, "invalid search params");
+    }
 }
 
 void
@@ -101,7 +103,9 @@ VerifyPlanNodeVisitor::visit(BinaryVectorANNS& node) {
 
     // NOTE: the second parameter is not checked in knowhere, may be redundant
     auto passed = adapter->CheckSearch(params_copy, inferred_type, index_mode);
-    AssertInfo(passed, "invalid search params");
+    if (!passed) {
+        PanicCodeInfo(ErrorCodeEnum::IllegalArgument, "invalid search params");
+    }
 }
 
 }  // namespace milvus::query
diff --git a/internal/core/src/segcore/ConcurrentVector.h b/internal/core/src/segcore/ConcurrentVector.h
index 2dd03b78d20ff548848187ebc5d0ee73034ccaf4..fac2d554a60b3580c2944dc1c08f6174099b006c 100644
--- a/internal/core/src/segcore/ConcurrentVector.h
+++ b/internal/core/src/segcore/ConcurrentVector.h
@@ -19,7 +19,7 @@
 #include <shared_mutex>
 #include <vector>
 #include <utility>
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "utils/tools.h"
 #include <boost/container/vector.hpp>
 #include "common/Types.h"
diff --git a/internal/core/src/segcore/SealedIndexingRecord.h b/internal/core/src/segcore/SealedIndexingRecord.h
index 62a836207104122fcb08bc25c45f73bb3cf7633e..20efc9cf358bc17784ac5f5370e56399d57e896e 100644
--- a/internal/core/src/segcore/SealedIndexingRecord.h
+++ b/internal/core/src/segcore/SealedIndexingRecord.h
@@ -16,7 +16,7 @@
 #include <utility>
 #include <memory>
 #include <tbb/concurrent_hash_map.h>
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "knowhere/index/vector_index/VecIndex.h"
 #include "common/Types.h"
 
diff --git a/internal/core/src/segcore/SegcoreConfig.cpp b/internal/core/src/segcore/SegcoreConfig.cpp
index e7808e9da8d6d86fcaa2a40652b15c0680c81a58..18f80db62404744419d22c37f88fb9b548608909 100644
--- a/internal/core/src/segcore/SegcoreConfig.cpp
+++ b/internal/core/src/segcore/SegcoreConfig.cpp
@@ -96,10 +96,10 @@ SegcoreConfig::parse_from(const std::string& config_path) {
                 result.table_[metric_type] = conf;
             }
         }
-    } catch (const WrappedRuntimeError& e) {
+    } catch (const SegcoreError& e) {
         // re-throw
         throw e;
-    } catch (std::exception& e) {
+    } catch (const std::exception& e) {
         PanicInfo(std::string("Invalid Yaml:\n") + e.what());
     }
 }
diff --git a/internal/core/src/segcore/SegmentGrowingImpl.h b/internal/core/src/segcore/SegmentGrowingImpl.h
index 25ea5162e055af81635da4788a1e6b3dd100e702..103b56afce2d986eb097eaae5b1cdeda1f70f5d8 100644
--- a/internal/core/src/segcore/SegmentGrowingImpl.h
+++ b/internal/core/src/segcore/SegmentGrowingImpl.h
@@ -26,7 +26,7 @@
 #include "query/deprecated/GeneralQuery.h"
 #include "utils/Status.h"
 #include "segcore/DeletedRecord.h"
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "FieldIndexing.h"
 #include "InsertRecord.h"
 #include <utility>
diff --git a/internal/core/src/segcore/deprecated/SegmentNaive.h b/internal/core/src/segcore/deprecated/SegmentNaive.h
index 15fd586d015ee5bd1940181936bc970528cd942f..ef24feb00d62ca57cf6418c16b8d4a08c777a960 100644
--- a/internal/core/src/segcore/deprecated/SegmentNaive.h
+++ b/internal/core/src/segcore/deprecated/SegmentNaive.h
@@ -20,7 +20,7 @@
 
 #include "query/deprecated/GeneralQuery.h"
 #include "utils/Status.h"
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 #include "segcore/SegmentBase.h"
 #include "segcore/AckResponder.h"
 #include "segcore/ConcurrentVector.h"
diff --git a/internal/core/src/segcore/load_index_c.cpp b/internal/core/src/segcore/load_index_c.cpp
index b58295b04954293a175ffb3d18d08c4a5fc4e59f..11f4794595e38fc39a279750fcdf89b1dc48e88e 100644
--- a/internal/core/src/segcore/load_index_c.cpp
+++ b/internal/core/src/segcore/load_index_c.cpp
@@ -13,7 +13,7 @@
 #include "index/knowhere/knowhere/index/vector_index/VecIndexFactory.h"
 #include "segcore/load_index_c.h"
 #include "common/LoadInfo.h"
-#include "utils/EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 
 CStatus
 NewLoadIndexInfo(CLoadIndexInfo* c_load_index_info) {
@@ -26,7 +26,7 @@ NewLoadIndexInfo(CLoadIndexInfo* c_load_index_info) {
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -52,7 +52,7 @@ AppendIndexParam(CLoadIndexInfo c_load_index_info, const char* c_index_key, cons
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -70,7 +70,7 @@ AppendFieldInfo(CLoadIndexInfo c_load_index_info, int64_t field_id) {
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -101,7 +101,7 @@ AppendIndex(CLoadIndexInfo c_load_index_info, CBinarySet c_binary_set) {
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -118,7 +118,7 @@ NewBinarySet(CBinarySet* c_binary_set) {
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -139,7 +139,7 @@ AppendBinaryIndex(CBinarySet c_binary_set, void* index_binary, int64_t index_siz
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
diff --git a/internal/core/src/segcore/plan_c.cpp b/internal/core/src/segcore/plan_c.cpp
index 2fe24b055b098143d008b44bfbf4f340fcfde3f4..e0f22a01e45321b5c6184078a724d4731448e644 100644
--- a/internal/core/src/segcore/plan_c.cpp
+++ b/internal/core/src/segcore/plan_c.cpp
@@ -26,9 +26,15 @@ CreatePlan(CCollection c_col, const char* dsl, CPlan* res_plan) {
         auto plan = (CPlan)res.release();
         *res_plan = plan;
         return status;
+    } catch (milvus::SegcoreError& e) {
+        auto status = CStatus();
+        status.error_code = e.get_error_code();
+        status.error_msg = strdup(e.what());
+        *res_plan = nullptr;
+        return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         *res_plan = nullptr;
         return status;
@@ -54,7 +60,7 @@ ParsePlaceholderGroup(CPlan c_plan,
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         *res_placeholder_group = nullptr;
         return status;
diff --git a/internal/core/src/segcore/reduce_c.cpp b/internal/core/src/segcore/reduce_c.cpp
index 37c849edaa950dc0dc6e25ae886f990c101f5951..f792ed010e161bf90ee14355bc2e74085358d962 100644
--- a/internal/core/src/segcore/reduce_c.cpp
+++ b/internal/core/src/segcore/reduce_c.cpp
@@ -10,7 +10,7 @@
 // or implied. See the License for the specific language governing permissions and limitations under the License
 
 #include <vector>
-#include <utils/EasyAssert.h>
+#include <exceptions/EasyAssert.h>
 #include "segcore/reduce_c.h"
 
 #include "segcore/Reduce.h"
@@ -155,7 +155,7 @@ ReduceQueryResults(CQueryResult* c_search_results, int64_t num_segments, bool* i
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -227,7 +227,7 @@ ReorganizeQueryResults(CMarshaledHits* c_marshaled_hits,
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         *c_marshaled_hits = nullptr;
         return status;
diff --git a/internal/core/src/segcore/segment_c.cpp b/internal/core/src/segcore/segment_c.cpp
index 38a88a5bc7aa954ac375340bc007aa08c49df0a3..6a6909bd222c794880b16846747c938a272fb69b 100644
--- a/internal/core/src/segcore/segment_c.cpp
+++ b/internal/core/src/segcore/segment_c.cpp
@@ -88,7 +88,7 @@ Search(CSegmentInterface c_segment,
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
 
@@ -112,7 +112,7 @@ FillTargetEntry(CSegmentInterface c_segment, CPlan c_plan, CQueryResult c_result
         status.error_code = Success;
         status.error_msg = "";
     } catch (std::runtime_error& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
     }
     return status;
@@ -166,7 +166,7 @@ Insert(CSegmentInterface c_segment,
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -183,7 +183,7 @@ PreInsert(CSegmentInterface c_segment, int64_t size, int64_t* offset) {
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -206,7 +206,7 @@ Delete(CSegmentInterface c_segment,
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -235,7 +235,7 @@ LoadFieldData(CSegmentInterface c_segment, CLoadFieldDataInfo load_field_data_in
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -254,7 +254,7 @@ UpdateSealedSegmentIndex(CSegmentInterface c_segment, CLoadIndexInfo c_load_inde
         status.error_msg = "";
         return status;
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -273,7 +273,7 @@ DropFieldData(CSegmentInterface c_segment, int64_t field_id) {
         return status;
     } catch (std::exception& e) {
         auto status = CStatus();
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -291,7 +291,7 @@ DropSealedSegmentIndex(CSegmentInterface c_segment, int64_t field_id) {
         status.error_msg = "";
         return status;
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
@@ -311,7 +311,7 @@ UpdateSegmentIndex(CSegmentInterface c_segment, CLoadIndexInfo c_load_index_info
         status.error_msg = "";
         return status;
     } catch (std::exception& e) {
-        status.error_code = UnexpectedException;
+        status.error_code = UnexpectedError;
         status.error_msg = strdup(e.what());
         return status;
     }
diff --git a/internal/core/src/utils/CMakeLists.txt b/internal/core/src/utils/CMakeLists.txt
index bef630016483f7e65494fe350fddb8a4580bff69..5479bde671420a01794313577a70477ffcc61b50 100644
--- a/internal/core/src/utils/CMakeLists.txt
+++ b/internal/core/src/utils/CMakeLists.txt
@@ -15,4 +15,4 @@ aux_source_directory( ${MILVUS_ENGINE_SRC}/utils UTILS_FILES )
 
 add_library( milvus_utils STATIC ${UTILS_FILES} )
 
-target_link_libraries( milvus_utils PRIVATE fiu )
+target_link_libraries( milvus_utils PRIVATE fiu milvus_exceptions)
diff --git a/internal/core/src/utils/tools.h b/internal/core/src/utils/tools.h
index 7e9f93d9983b2b0a7c655e935fcf07a6288c9aa3..b99ddda6ef5f47700c0ba6cc4cf7caac12fe42f4 100644
--- a/internal/core/src/utils/tools.h
+++ b/internal/core/src/utils/tools.h
@@ -11,7 +11,7 @@
 
 #pragma once
 #include <cstdint>
-#include "EasyAssert.h"
+#include "exceptions/EasyAssert.h"
 namespace milvus {
 inline int64_t
 upper_align(int64_t value, int64_t align) {
diff --git a/internal/querynode/collection_replica.go b/internal/querynode/collection_replica.go
index 7e89d6a11f57d19445c85d156cc5f8b0c1b45264..4dea0a2abe639efb0da6d5c2d968da296be7312e 100644
--- a/internal/querynode/collection_replica.go
+++ b/internal/querynode/collection_replica.go
@@ -415,8 +415,8 @@ func (colReplica *collectionReplica) removeSegmentPrivate(segmentID UniqueID) er
 		return err
 	}
 
-	partition, err := colReplica.getPartitionByIDPrivate(segment.partitionID)
-	if err != nil {
+	partition, err2 := colReplica.getPartitionByIDPrivate(segment.partitionID)
+	if err2 != nil {
 		return err
 	}
 
diff --git a/internal/querynode/error_msg.go b/internal/querynode/error_msg.go
new file mode 100644
index 0000000000000000000000000000000000000000..7b6dddc6d590595b81a80d55bc000014a1f0c6ea
--- /dev/null
+++ b/internal/querynode/error_msg.go
@@ -0,0 +1,35 @@
+package querynode
+
+/*
+#cgo CFLAGS: -I${SRCDIR}/../core/output/include
+#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_segcore -Wl,-rpath=${SRCDIR}/../core/output/lib
+
+#include <malloc.h>
+#include "common/type_c.h"
+*/
+import "C"
+import (
+	"errors"
+	"fmt"
+	"github.com/zilliztech/milvus-distributed/internal/log"
+	"github.com/zilliztech/milvus-distributed/internal/proto/commonpb"
+	"unsafe"
+)
+
+func HandleCStatus(status *C.CStatus, extraInfo string) error {
+	if status.error_code == 0 {
+		return nil
+	}
+	errorCode := status.error_code
+	errorName, ok := commonpb.ErrorCode_name[int32(errorCode)]
+	if !ok {
+		errorName = "UnknownError"
+	}
+	errorMsg := C.GoString(status.error_msg)
+	defer C.free(unsafe.Pointer(status.error_msg))
+
+	finalMsg := fmt.Sprintf("[%s] %s", errorName, errorMsg)
+	logMsg := fmt.Sprintf("%s, C Runtime Exception: %s\n", extraInfo, finalMsg)
+	log.Error(logMsg)
+	return errors.New(finalMsg)
+}
diff --git a/internal/querynode/plan.go b/internal/querynode/plan.go
index 6e212c0b7cde00e7989f4888e4de26a6ef7bdbf4..50c0d3296df84cd6330304b30bf9adbfced6b2d7 100644
--- a/internal/querynode/plan.go
+++ b/internal/querynode/plan.go
@@ -10,7 +10,6 @@ package querynode
 */
 import "C"
 import (
-	"strconv"
 	"unsafe"
 
 	"errors"
@@ -25,12 +24,8 @@ func createPlan(col Collection, dsl string) (*Plan, error) {
 	var cPlan C.CPlan
 	status := C.CreatePlan(col.collectionPtr, cDsl, &cPlan)
 
-	errorCode := status.error_code
-
-	if errorCode != 0 {
-		errorMsg := C.GoString(status.error_msg)
-		defer C.free(unsafe.Pointer(status.error_msg))
-		return nil, errors.New("Create plan failed, C runtime error detected, error code = " + strconv.Itoa(int(errorCode)) + ", error msg = " + errorMsg)
+	if err := HandleCStatus(&status, "Create Plan failed"); err != nil {
+		return nil, err
 	}
 
 	var newPlan = &Plan{cPlan: cPlan}
@@ -66,12 +61,8 @@ func parserPlaceholderGroup(plan *Plan, placeHolderBlob []byte) (*PlaceholderGro
 	var cPlaceholderGroup C.CPlaceholderGroup
 	status := C.ParsePlaceholderGroup(plan.cPlan, blobPtr, blobSize, &cPlaceholderGroup)
 
-	errorCode := status.error_code
-
-	if errorCode != 0 {
-		errorMsg := C.GoString(status.error_msg)
-		defer C.free(unsafe.Pointer(status.error_msg))
-		return nil, errors.New("Parser placeholder group failed, C runtime error detected, error code = " + strconv.Itoa(int(errorCode)) + ", error msg = " + errorMsg)
+	if err := HandleCStatus(&status, "parser placeholder group failed"); err != nil {
+		return nil, err
 	}
 
 	var newPlaceholderGroup = &PlaceholderGroup{cPlaceholderGroup: cPlaceholderGroup}