{"record":{"id":"3f240560a51a6cba","repo":"apache/seatunnel","slug":"invalid-graph-schema-3f2405","errorCode":"INVALID_GRAPH_SCHEMA","errorMessage":"No %s labels found in HugeGraph graph '%s'; nothing to read.","messagePattern":"No (.+?) labels found in HugeGraph graph '(.+?)'; nothing to read\\.","errorType":"error_code","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/source/HugeGraphSourceFactory.java","lineNumber":176,"sourceCode":"                options.getOptional(HugeGraphSourceOptions.FILTER)\n                        .map(filter -> !filter.isEmpty())\n                        .orElse(false);\n        if (hasFilter) {\n            throw new HugeGraphConnectorException(\n                    HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                    \"'filter' cannot be combined with reading all labels (option 'label' omitted): \"\n                            + \"a property-equality filter assumes the property exists on every \"\n                            + \"label. Set 'label' to use 'filter'.\");\n        }\n        HugeGraphClient client = new HugeGraphClient(HugeGraphConnectionConfig.of(options));\n        List<String> labels;\n        try {\n            labels =\n                    labelType == MappingConfig.LabelType.VERTEX\n                            ? client.listVertexLabels()\n                            : client.listEdgeLabels();\n            if (labels.isEmpty()) {\n                throw new HugeGraphConnectorException(\n                        HugeGraphConnectorErrorCode.INVALID_GRAPH_SCHEMA,\n                        String.format(\n                                \"No %s labels found in HugeGraph graph '%s'; nothing to read.\",\n                                labelType == MappingConfig.LabelType.VERTEX ? \"vertex\" : \"edge\",\n                                options.get(HugeGraphOptions.GRAPH_NAME)));\n            }\n            for (String label : labels) {\n                SeaTunnelRowType propertyRowType =\n                        discoverPropertyRowType(client, label, labelType);\n                CatalogTable propertyTable =\n                        CatalogTableUtil.getCatalogTable(label, propertyRowType);\n                CatalogTable producedTable =\n                        CatalogTableUtil.newCatalogTable(\n                                propertyTable, prependReservedFields(propertyRowType, labelType));\n                catalogTables.add(producedTable);\n                labelContexts.put(\n                        label,\n                        new LabelTableContext(","sourceCodeStart":158,"sourceCodeEnd":194,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/source/HugeGraphSourceFactory.java#L158-L194","documentation":"When reading all labels of a type (vertex or edge), the factory queries HugeGraph for the label list via the client. If the server returns an empty list there is nothing to read, so the factory fails fast with INVALID_GRAPH_SCHEMA including the label type and graph name, instead of emitting a job with zero splits.","triggerScenarios":"createSource() -> buildReadAllTables() with 'label' omitted; client.listVertexLabels() or listEdgeLabels() returns an empty collection for the configured graph.","commonSituations":"Connecting to the wrong or a freshly created/empty HugeGraph graph; typo in graph name so a different empty graph is queried; wrong label type (reading edges when only vertices exist); schema not yet created on the target graph.","solutions":["Verify HugeGraphOptions.GRAPH_NAME matches the intended, populated graph.","Check the HugeGraph server (e.g., via its REST API) that vertex/edge labels actually exist in that graph.","Swap the label type configuration (vertex vs edge) if you queried the wrong kind.","Create the schema (labels) on the target graph before running the job."],"exampleFix":"// before\nsource {\n  HugeGraph {\n    graph = \"emptygraph\"\n    label_type = vertex\n  }\n}\n// after\nsource {\n  HugeGraph {\n    graph = \"hugegraph\"   # graph that actually has vertex labels\n    label_type = vertex\n  }\n}","handlingStrategy":"validation","validationCode":"// curl -s \"http://HOST:PORT/graphs/<graph>/schema/vertexlabels\" | jq 'length' # > 0","typeGuard":null,"tryCatchPattern":"try {\n  factory.createSource(config);\n} catch (HugeGraphConnectorException e) {\n  if (e.getErrorCode() == INVALID_GRAPH_SCHEMA) { /* check graph name / schema */ }\n}","preventionTips":["Confirm graph name and that the graph has labels before submitting.","Query the HugeGraph REST API to list labels as a preflight.","Match label_type (vertex vs edge) to what actually exists."],"tags":["source","schema","empty","hugegraph"],"backgroundTag":"empty-result-set","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}