{"record":{"id":"d700f77a65ff2521","repo":"apache/seatunnel","slug":"the-s-mode-is-not-supported","errorCode":null,"errorMessage":"The %s mode is not supported.","messagePattern":"The (.+?) mode is not supported\\.","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/config/StartupConfig.java","lineNumber":84,"sourceCode":"        switch (startupMode) {\n            case EARLIEST:\n                return offsetFactory.earliest();\n            case LATEST:\n                return offsetFactory.latest();\n            case INITIAL:\n            case SNAPSHOT_ONLY:\n                return null;\n            case COMMITTED_OFFSET:\n                return offsetFactory.committedOffset();\n            case SPECIFIC:\n                if (specificOffset != null) {\n                    return offsetFactory.specific(specificOffset);\n                }\n                return offsetFactory.specific(specificOffsetFile, specificOffsetPos);\n            case TIMESTAMP:\n                return offsetFactory.timestamp(timestamp);\n            default:\n                throw new IllegalArgumentException(\n                        String.format(\"The %s mode is not supported.\", startupMode));\n        }\n    }\n}\n","sourceCodeStart":66,"sourceCodeEnd":89,"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/config/StartupConfig.java#L66-L89","documentation":"StartupConfig.getStartupOffset converts the configured CDC startup mode into an offset via the OffsetFactory. The switch only handles INITIAL, EARLIEST, LATEST, SPECIFIC and TIMESTAMP; any other StartupMode value reaches the default branch and throws IllegalArgumentException('The %s mode is not supported.').","triggerScenarios":"Calling getStartupOffset with a startup.mode that resolves to an enum constant not covered by the switch — typically a newly added StartupMode or a mis-mapped mode value from config parsing.","commonSituations":"Using a newer connector version that introduces a startup mode the local cdc-base doesn't handle; mixing connector-cdc-base versions with a connector expecting another mode; programmatic construction of StartupConfig with an exotic enum.","solutions":["Set startup.mode to one of the supported values: initial, earliest, latest, specific, or timestamp","Align connector-cdc-base and the CDC connector module versions so the enum set matches","Add the missing case to the switch if you maintain a fork","Check config parsing isn't mapping your configured string to an unexpected enum"],"exampleFix":"// before\nstartup { mode = \"custom-scan\" }\n// after\nstartup { mode = \"latest\" }","handlingStrategy":"validation","validationCode":"if (startupMode != StartupMode.INITIAL && startupMode != StartupMode.EARLIEST\n    && startupMode != StartupMode.LATEST && startupMode != StartupMode.SPECIFIC\n    && startupMode != StartupMode.TIMESTAMP) {\n    throw new IllegalArgumentException(\"unsupported startup mode: \" + startupMode);\n}","typeGuard":"boolean isSupportedStartupMode(StartupConfig.StartupMode m) {\n    return EnumSet.of(StartupConfig.StartupMode.INITIAL, StartupConfig.StartupMode.EARLIEST,\n        StartupConfig.StartupMode.LATEST, StartupConfig.StartupMode.SPECIFIC,\n        StartupConfig.StartupMode.TIMESTAMP).contains(m);\n}","tryCatchPattern":null,"preventionTips":["Only configure startup.mode values documented for your SeaTunnel version","Pin consistent connector-cdc-base and connector module versions","Map config strings through the enum's supported values only"],"tags":["cdc","startup-mode","enum"],"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-14T11:17:12.474Z"}