diff --git a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java b/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java index 3e5d56ca0e..23f74f5220 100644 --- a/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java +++ b/hugegraph-core/src/main/java/org/apache/hugegraph/structure/HugeElement.java @@ -431,6 +431,9 @@ public static final ElementKeys classifyKeys(Object... keyValues) { .providedKeyValuesMustHaveALegalKeyOnEvenIndices(); } if (val == null) { + if (key.equals(T.label)) { + throw Element.Exceptions.labelCanNotBeNull(); + } throw Property.Exceptions.propertyDoesNotExist(); }