diff --git a/internal/util/typeutil/schema.go b/internal/util/typeutil/schema.go index e2dfb5a4fe..a2822bdd63 100644 --- a/internal/util/typeutil/schema.go +++ b/internal/util/typeutil/schema.go @@ -97,7 +97,7 @@ func CreateSchemaHelper(schema *schemapb.CollectionSchema) (*SchemaHelper, error // GetPrimaryKeyField returns the schema of the primary key func (helper *SchemaHelper) GetPrimaryKeyField() (*schemapb.FieldSchema, error) { if helper.primaryKeyOffset == -1 { - return nil, fmt.Errorf("no primary in schema") + return nil, fmt.Errorf("Failed to get primary key field: no primary in schema") } return helper.schema.Fields[helper.primaryKeyOffset], nil }