{"record":{"id":"76316776b1ddd438","repo":"apache/seatunnel","slug":"nebulagraph-string-vertex-ids-must-not-contain-uns","errorCode":null,"errorMessage":"NebulaGraph string vertex IDs must not contain unsupported control characters.","messagePattern":"NebulaGraph string vertex IDs must not contain unsupported control characters\\.","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-nebulagraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/nebulagraph/sink/NebulaGraphStatementBuilder.java","lineNumber":151,"sourceCode":"                    break;\n                case '\\n':\n                    escaped.append(\"\\\\n\");\n                    break;\n                case '\\r':\n                    escaped.append(\"\\\\r\");\n                    break;\n                case '\\t':\n                    escaped.append(\"\\\\t\");\n                    break;\n                case '\\b':\n                    escaped.append(\"\\\\b\");\n                    break;\n                case '\\f':\n                    escaped.append(\"\\\\f\");\n                    break;\n                default:\n                    if (Character.isISOControl(character)) {\n                        throw new IllegalArgumentException(\n                                \"NebulaGraph string vertex IDs must not contain unsupported control characters.\");\n                    }\n                    escaped.append(character);\n            }\n        }\n        return escaped.append('\"').toString();\n    }\n\n    private static String quoteIdentifier(String identifier) {\n        return \"`\" + validateIdentifier(identifier) + \"`\";\n    }\n\n    private static String validateIdentifier(String identifier) {\n        if (identifier == null || !IDENTIFIER.matcher(identifier).matches()) {\n            throw new NebulaGraphConnectorException(\n                    NebulaGraphConnectorErrorCode.INVALID_CONFIG,\n                    \"NebulaGraph tag and property names must contain only letters, digits, or underscores and must not start with a digit: \"\n                            + identifier);","sourceCodeStart":133,"sourceCodeEnd":169,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-nebulagraph/src/main/java/org/apache/seatunnel/connectors/seatunnel/nebulagraph/sink/NebulaGraphStatementBuilder.java#L133-L169","documentation":"When serializing a string vertex ID to nGQL, formatVid() escapes common control characters but throws this IllegalArgumentException for any other ISO control character (0x00-0x1F, 0x7F) it cannot safely escape. NebulaGraph string VIDs in quoted nGQL cannot contain raw control characters, so the connector fails fast to avoid producing corrupt or injectable statements.","triggerScenarios":"Writing a vertex whose SeaTunnel string ID column contains control characters such as \\u0000, \\u0001, or other non-printable bytes not in the escaped set (\\n, \\r, \\t, \\b, \\f, quote, backslash).","commonSituations":"Source data from binary logs or legacy systems with embedded NUL/control bytes; user IDs or keys copied with invisible characters; data corruption from upstream parsing.","solutions":["Sanitize string vertex IDs before writing, stripping or replacing control characters","Convert the vertex ID column to a numeric type if Nebula VID type is INT","Fix the upstream source/parser that is emitting control characters","Escape expected control characters explicitly in your transform before the sink"],"exampleFix":"// before\nString vid = row.getField(0).toString();\n// after\nString vid = row.getField(0).toString().replaceAll(\"\\\\p{Cntrl}\", \"\");","handlingStrategy":"validation","validationCode":"static boolean isSafeVid(String vid) { return vid.chars().noneMatch(Character::isISOControl); }","typeGuard":"String safeVid(String vid) { return vid == null ? null : vid.replaceAll(\"\\\\p{Cntrl}\", \"\"); }","tryCatchPattern":"try { sink.write(row); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"control characters\")) { /* sanitize and rewrite or dead-letter */ } else { throw e; } }","preventionTips":["Sanitize ID columns in a transform before the sink","Inspect source data for invisible control bytes","Prefer numeric VIDs when possible"],"tags":["java","nebulagraph","data-quality"],"backgroundTag":"invalid-argument-format","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"}