From c3e8903dc2efcf77b0e197587061c1b9a46810d6 Mon Sep 17 00:00:00 2001 From: Xiangyu Wang Date: Thu, 21 Oct 2021 19:42:26 +0800 Subject: [PATCH] [skip ci]Improve error message in schema (#10353) Signed-off-by: Xiangyu Wang --- internal/util/typeutil/schema.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }