{"record":{"id":"42102c167682ded9","repo":"apache/seatunnel","slug":"illegal-config-argument-42102c","errorCode":"ILLEGAL_CONFIG_ARGUMENT","errorMessage":"unfold requires a CUSTOMIZE_STRING/NUMBER/UUID id strategy, but got %s","messagePattern":"unfold requires a CUSTOMIZE_STRING/NUMBER/UUID id strategy, but got (.+?)","errorType":"validation","errorClass":"HugeGraphConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/mapper/VertexMapper.java","lineNumber":181,"sourceCode":"            Vertex vertex = new Vertex(mappingConfig.getLabel());\n            vertex.id(coerceCustomizeId(strategy, elem));\n            // The id field is the unfolded source, not a property — skip it.\n            applyProperties(vertex, row, idField);\n            result.add(vertex);\n        }\n        return result;\n    }\n\n    private static Object coerceCustomizeId(IdStrategy strategy, Object elem) {\n        switch (strategy) {\n            case CUSTOMIZE_STRING:\n                return checkVertexIdLength(String.valueOf(elem));\n            case CUSTOMIZE_NUMBER:\n                return coerceNumberId(elem);\n            case CUSTOMIZE_UUID:\n                return elem instanceof UUID ? elem : UUID.fromString(String.valueOf(elem));\n            default:\n                throw new HugeGraphConnectorException(\n                        HugeGraphConnectorErrorCode.ILLEGAL_CONFIG_ARGUMENT,\n                        \"unfold requires a CUSTOMIZE_STRING/NUMBER/UUID id strategy, but got \"\n                                + strategy);\n        }\n    }\n\n    private void applyProperties(Vertex vertex, SeaTunnelRow row, String skipField) {\n        Map<String, String> fm = mappingConfig.getFieldMapping();\n        for (String sourceField : propertySourceFields) {\n            if (sourceField.equals(skipField)) {\n                continue;\n            }\n            Integer index = fieldsIndex.get(sourceField);\n            if (index == null) {\n                continue;\n            }\n\n            String propName = fm.getOrDefault(sourceField, sourceField);","sourceCodeStart":163,"sourceCodeEnd":199,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-hugegraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/hugegraph/mapper/VertexMapper.java#L163-L199","documentation":"VertexMapper.coerceCustomizeId converts unfold element values into vertex IDs and supports only CUSTOMIZE_STRING, CUSTOMIZE_NUMBER and CUSTOMIZE_UUID IdStrategies. Any other strategy reaches the default branch and throws ILLEGAL_CONFIG_ARGUMENT.","triggerScenarios":"Calling coerceCustomizeId from mapAll with unfold values while the vertex id_strategy is not one of the three customize strategies (e.g. AUTOMATIC or PRIMARY_KEY).","commonSituations":"Using unfold to write vertices whose ids are server-generated; switching id_strategy to PRIMARY_KEY after adding unfold support; template configs copied between graphs.","solutions":["Set the vertex id_strategy to CUSTOMIZE_STRING, CUSTOMIZE_NUMBER, or CUSTOMIZE_UUID when using unfold","Drop the unfold option if ids should be generated by HugeGraph","Ensure the id column referenced by unfold contains concrete id values"],"exampleFix":"// before\nvertex = { id_strategy = \"PRIMARY_KEY\" }\n// after\nvertex = { id_strategy = \"CUSTOMIZE_STRING\" }","handlingStrategy":"validation","validationCode":"if (unfoldEnabled && !(strategy == CUSTOMIZE_STRING || strategy == CUSTOMIZE_NUMBER || strategy == CUSTOMIZE_UUID)) {\n  throw new IllegalArgumentException(\"unfold requires CUSTOMIZE_STRING/NUMBER/UUID\");\n}","typeGuard":null,"tryCatchPattern":"try { vertexMapper.mapAll(rows); } catch (HugeGraphConnectorException e) { if (e.getMessage().contains(\"unfold requires\")) { /* set a CUSTOMIZE_* id_strategy */ } }","preventionTips":["Enable unfold only for vertices with customize id strategies","Avoid mixing unfold with AUTOMATIC/PRIMARY_KEY id generation","Validate id_strategy early in config review"],"tags":["hugegraph","mapper","vertex","id-strategy"],"backgroundTag":"unsupported-enum-value","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}