{"record":{"id":"73bfea4c4bb386f1","repo":"apache/seatunnel","slug":"unknown-option-name","errorCode":null,"errorMessage":"Unknown option name: ","messagePattern":"Unknown option name: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/CommonOptions.java","lineNumber":114,"sourceCode":"     * format data.\n     */\n    IS_BINARY_FORMAT(\"is_binary_format\", true);\n\n    private final String name;\n    private final boolean supportMetadataTrans;\n\n    CommonOptions(String name, boolean supportMetadataTrans) {\n        this.name = name;\n        this.supportMetadataTrans = supportMetadataTrans;\n    }\n\n    public static CommonOptions fromName(String name) {\n        for (CommonOptions option : CommonOptions.values()) {\n            if (option.getName().equals(name)) {\n                return option;\n            }\n        }\n        throw new IllegalArgumentException(\"Unknown option name: \" + name);\n    }\n}\n","sourceCodeStart":96,"sourceCodeEnd":117,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/table/type/CommonOptions.java#L96-L117","documentation":"CommonOptions.fromName(name) looks up a known common option (e.g. plugin_name, plugin_output) by its exact name and throws IllegalArgumentException when no enum constant matches. The API defines a closed set of common option names, so any unrecognized string is rejected immediately.","triggerScenarios":"Calling CommonOptions.fromName with a string that is not one of the defined enum names, e.g. a connector-specific option name or a name with different casing/whitespace.","commonSituations":"Parsing user configs and passing arbitrary keys into fromName; typos like 'pluginName' instead of 'plugin_name'; forwarding options added in a newer SeaTunnel version to an older enum.","solutions":["Validate the option name against CommonOptions.getName() values (or the enum's known names) before calling fromName","Fix casing/spelling: names are lowercase snake_case (e.g. 'plugin_name')","Handle connector-specific options with the connector's own Option definitions instead of CommonOptions","If the option was added in a newer release, upgrade the SeaTunnel dependency version"],"exampleFix":"// before\nCommonOptions opt = CommonOptions.fromName(configKey); // may throw\n// after\nif (Arrays.stream(CommonOptions.values()).anyMatch(o -> o.getName().equals(configKey))) {\n    CommonOptions opt = CommonOptions.fromName(configKey);\n}","handlingStrategy":"type-guard","validationCode":"boolean known = Arrays.stream(CommonOptions.values())\n    .anyMatch(o -> o.getName().equals(name));","typeGuard":null,"tryCatchPattern":"try {\n    CommonOptions opt = CommonOptions.fromName(name);\n} catch (IllegalArgumentException e) {\n    // fall back to connector-specific option lookup or skip\n}","preventionTips":["Match names exactly: lowercase snake_case","Only feed CommonOptions the well-known common keys","Route connector-specific keys to the connector's Option registry","Log unknown keys instead of hard-failing in config parsing"],"tags":["options","enum","argument"],"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-23T08:17:48.524Z"}