{"record":{"id":"e3f984254b8ebed8","repo":"apache/seatunnel","slug":"invalid-value-for-option-optionkey","errorCode":null,"errorMessage":"Invalid value for option '\" + optionKey + \"'. \" + e.getMessage()","messagePattern":"Invalid value for option '\" \\+ optionKey \\+ \"'\\. \" \\+ e\\.getMessage\\(\\)","errorType":"exception","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/schema/SchemaChangeEventFilter.java","lineNumber":96,"sourceCode":"     * <p>Invoked at job submission time (from the source factory) so an unknown canonical name —\n     * e.g. a typo such as {@code rename.tabble} — fails fast during submission with a message\n     * listing the valid names, instead of bypassing submission-time option validation and failing\n     * later during source initialization.\n     */\n    public static void validateOptions(ReadonlyConfig config) {\n        validateNames(\n                SourceOptions.SCHEMA_CHANGES_INCLUDE.key(),\n                config.get(SourceOptions.SCHEMA_CHANGES_INCLUDE));\n        validateNames(\n                SourceOptions.SCHEMA_CHANGES_EXCLUDE.key(),\n                config.get(SourceOptions.SCHEMA_CHANGES_EXCLUDE));\n    }\n\n    private static void validateNames(String optionKey, List<String> names) {\n        try {\n            SchemaChangeEventType.fromCanonicalNames(names);\n        } catch (IllegalArgumentException e) {\n            throw new IllegalArgumentException(\n                    \"Invalid value for option '\" + optionKey + \"'. \" + e.getMessage(), e);\n        }\n    }\n\n    public boolean isNoOp() {\n        return includeTypes.isEmpty() && excludeTypes.isEmpty();\n    }\n\n    /**\n     * Applies the filter to a normalized schema change event.\n     *\n     * @return the original event when fully eligible, a reduced {@link AlterTableColumnsEvent} when\n     *     only some of its column sub-events are eligible, or {@code null} when the whole event is\n     *     filtered out.\n     */\n    public SchemaChangeEvent filter(SchemaChangeEvent event) {\n        if (event == null || isNoOp()) {\n            return event;","sourceCodeStart":78,"sourceCodeEnd":114,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-cdc/connector-cdc-base/src/main/java/org/apache/seatunnel/connectors/cdc/base/schema/SchemaChangeEventFilter.java#L78-L114","documentation":"SchemaChangeEventFilter.validateNames validates include/exclude schema-change event type option values by parsing them with SchemaChangeEventType.fromCanonicalNames. When a value is not a recognized canonical event type name, the resulting IllegalArgumentException is rethrown with the offending option key and the underlying message, so users know exactly which option contained the bad value.","triggerScenarios":"Configuring schema-change.include-types or schema-change.exclude-types (optionKey) with a list containing a name not in the canonical set; fromCanonicalNames throws and validateNames wraps it.","commonSituations":"Typos in option values (e.g. 'alter-table ' vs canonical names), using Debezium DDL event names instead of SeaTunnel's canonical types, wrong casing/spelling like 'ADD_COLUMN' vs expected names, or options set programmatically with stale constants after a version upgrade.","solutions":["Read the wrapped e.getMessage() and validNames list in the error to see the exact accepted names","Replace invalid entries in schema-change.include-types / exclude-types with canonical names exactly as listed","Trim stray whitespace and verify separators (comma-separated list)","After upgrading SeaTunnel, re-check the docs for renamed canonical event type names"],"exampleFix":"// before\n\"schema-change.include-types\" = [\"ALTER TABLE\", \"add colum\"]\n// after\n\"schema-change.include-types\" = [\"alter-table\", \"add-column\"]","handlingStrategy":"validation","validationCode":"// validate include/exclude types against the known canonical names before use\nSet<String> valid = SchemaChangeEventType.CANONICAL_NAME_TO_EVENT_TYPE.keySet();\nList<String> values = config.get(\"schema-change.include-types\");\nList<String> bad = values.stream().map(String::trim).filter(v -> !valid.contains(v.toLowerCase())).collect(Collectors.toList());\nif (!bad.isEmpty()) throw new IllegalArgumentException(\"Unknown event types: \" + bad);","typeGuard":null,"tryCatchPattern":"try {\n    filter = SchemaChangeEventFilter.fromConfig(options);\n} catch (IllegalArgumentException e) {\n    // message names the option key and valid values; fix config and resubmit\n}","preventionTips":["Copy event type names only from the official docs' canonical list","Keep include/exclude lists lowercase, trimmed, comma-separated","Re-validate option values after SeaTunnel upgrades"],"tags":["cdc","config-validation","enum","schema-change"],"backgroundTag":"invalid-enum-value","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"}