{"record":{"id":"56386d4e2d74b9f0","repo":"apache/seatunnel","slug":"the-s-mode-is-not-supported-56386d","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/StopConfig.java","lineNumber":51,"sourceCode":"    private static final long serialVersionUID = 1L;\n\n    @Getter private final StopMode stopMode;\n    private final String specificOffsetFile;\n    private final Long specificOffsetPos;\n    private final Long timestamp;\n\n    public Offset getStopOffset(OffsetFactory offsetFactory) {\n        switch (stopMode) {\n            case LATEST:\n                return offsetFactory.latest();\n            case NEVER:\n                return offsetFactory.neverStop();\n            case SPECIFIC:\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.\", stopMode));\n        }\n    }\n}\n","sourceCodeStart":33,"sourceCodeEnd":56,"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/StopConfig.java#L33-L56","documentation":"StopConfig.getStopOffset mirrors the startup logic: it maps the configured stop mode (NEVER, LATEST, SPECIFIC, TIMESTAMP) to an offset, and the default branch throws IllegalArgumentException('The %s mode is not supported.') for any other StopMode value.","triggerScenarios":"Calling getStopOffset with a stop.mode resolving to an enum constant outside NEVER/LATEST/SPECIFIC/TIMESTAMP — e.g. a mode added in a different version or produced by faulty config parsing.","commonSituations":"Version mismatch between connector-cdc-base and the CDC connector module; hand-built StopConfig with an enum variant the switch predates; typo mapping in mode parsing.","solutions":["Set stop.mode to a supported value: never, latest, specific, or timestamp","Keep connector-cdc-base and CDC connector versions consistent","Add the missing case to the switch if you maintain a fork","Verify the config parser maps your stop.mode string to the intended enum"],"exampleFix":"// before\nstop { mode = \"never-stop\" }\n// after\nstop { mode = \"never\" }","handlingStrategy":"validation","validationCode":"if (stopMode != StopConfig.StopMode.NEVER && stopMode != StopConfig.StopMode.LATEST\n    && stopMode != StopConfig.StopMode.SPECIFIC && stopMode != StopConfig.StopMode.TIMESTAMP) {\n    throw new IllegalArgumentException(\"unsupported stop mode: \" + stopMode);\n}","typeGuard":"boolean isSupportedStopMode(StopConfig.StopMode m) {\n    return EnumSet.of(StopConfig.StopMode.NEVER, StopConfig.StopMode.LATEST,\n        StopConfig.StopMode.SPECIFIC, StopConfig.StopMode.TIMESTAMP).contains(m);\n}","tryCatchPattern":null,"preventionTips":["Restrict stop.mode to never/latest/specific/timestamp","Keep cdc-base and connector versions aligned","Validate mode strings during config parsing"],"tags":["cdc","stop-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"}