fix: [AddField] Use correct error code for SchemaMismatch (#42839)

Related to #41858

The error code returned for `SchemaMismatch` was 109, which was not
matched with definition in common.proto. The correct value shall be 62
instead.

---------

Signed-off-by: Congqi Xia <congqi.xia@zilliz.com>
This commit is contained in:
congqixia 2025-06-19 11:42:39 +08:00 committed by GitHub
parent e2c85eec81
commit 2cb296ff3b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -19,6 +19,8 @@ package merr
import (
"github.com/cockroachdb/errors"
"github.com/samber/lo"
"github.com/milvus-io/milvus-proto/go-api/v2/commonpb"
)
const (
@ -71,7 +73,7 @@ var (
ErrCollectionOnRecovering = newMilvusError("collection on recovering", 106, true)
ErrCollectionVectorClusteringKeyNotAllowed = newMilvusError("vector clustering key not allowed", 107, false)
ErrCollectionReplicateMode = newMilvusError("can't operate on the collection under standby mode", 108, false)
ErrCollectionSchemaMismatch = newMilvusError("collection schema mismatch", 109, false)
ErrCollectionSchemaMismatch = newMilvusError("collection schema mismatch", int32(commonpb.ErrorCode_SchemaMismatch), false)
// Partition related
ErrPartitionNotFound = newMilvusError("partition not found", 200, false)
ErrPartitionNotLoaded = newMilvusError("partition not loaded", 201, false)