{"record":{"id":"c6b7cf0dc6899799","repo":"apache/seatunnel","slug":"seatunnelapierrorcode-option-validation-failed","errorCode":"SeaTunnelAPIErrorCode.OPTION_VALIDATION_FAILED","errorMessage":"Unsupported start mode: %s","messagePattern":"Unsupported start mode: (.+?)","errorType":"error_code","errorClass":"PulsarConnectorException","httpStatus":null,"severity":"error","filePath":"seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/source/PulsarSource.java","lineNumber":326,"sourceCode":"            throw new PulsarConnectorException(\n                    SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                    \"Bounded streams do not support dynamic partition discovery.\");\n        }\n    }\n\n    private StartCursor createStartCursor(PulsarTableConfig tableConfig) {\n        PulsarSourceOptions.StartMode startMode = tableConfig.getStartMode();\n        switch (startMode) {\n            case EARLIEST:\n                return StartCursor.earliest();\n            case LATEST:\n                return StartCursor.latest();\n            case SUBSCRIPTION:\n                return StartCursor.subscription(tableConfig.getResetMode());\n            case TIMESTAMP:\n                return StartCursor.timestamp(tableConfig.getStartTimestamp());\n            default:\n                throw new PulsarConnectorException(\n                        SeaTunnelAPIErrorCode.OPTION_VALIDATION_FAILED,\n                        \"Unsupported start mode: \" + startMode);\n        }\n    }\n\n    private StopCursor createStopCursor(PulsarTableConfig tableConfig) {\n        PulsarSourceOptions.StopMode stopMode = tableConfig.getStopMode();\n        switch (stopMode) {\n            case LATEST:\n                return StopCursor.latest();\n            case NEVER:\n                return StopCursor.never();\n            case TIMESTAMP:\n                return StopCursor.timestamp(tableConfig.getStopTimestamp());\n            default:\n                throw new PulsarConnectorException(\n                        SeaTunnelAPIErrorCode.CONFIG_VALIDATION_FAILED,\n                        \"Unsupported stop mode: \" + stopMode);","sourceCodeStart":308,"sourceCodeEnd":344,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-connectors-v2/connector-pulsar/src/main/java/org/apache/seatunnel/connectors/seatunnel/pulsar/source/PulsarSource.java#L308-L344","documentation":"PulsarSource.buildStartCursor (createStartCursor) converts the configured 'start.mode' enum into a StartCursor object. When the configured mode does not match any supported case (EARLIEST, LATEST, SUBSCRIPTION, TIMESTAMP), the switch falls through to default and throws this OPTION_VALIDATION_FAILED error. It means the user supplied a start mode value the connector does not recognize.","triggerScenarios":"Setting PulsarSourceOptions.START_MODE to a value outside the supported enum (e.g. a typo like 'timeestamp', an unsupported mode string such as 'external', or a case-mismatched value) so the parsed PulsarStartMode is unrecognized in createStartCursor's switch.","commonSituations":"Copy-pasting start.mode values from older docs or other connectors (e.g. Kafka's 'group-offsets'), typos in HOCON config, or using a mode added in a newer SeaTunnel version than the one deployed.","solutions":["Check the start.mode value in the config and set it to one of: EARLIEST, LATEST, SUBSCRIPTION, or TIMESTAMP.","Fix case sensitivity/typos (the enum is matched exactly, e.g. 'TIMESTAMP' not 'timestamp').","If using SUBSCRIPTION or TIMESTAMP, also set the paired options (subscription.name/reset mode or start.timestamp).","Verify the deployed SeaTunnel version supports the mode you want; upgrade if the mode was added later."],"exampleFix":"// before\nstart.mode = \"group-offsets\"\n// after\nstart.mode = \"SUBSCRIPTION\"","handlingStrategy":"validation","validationCode":"Set<String> VALID = Set.of(\"EARLIEST\",\"LATEST\",\"SUBSCRIPTION\",\"TIMESTAMP\");\nif (!VALID.contains(cfg.getString(\"start.mode\")))\n    throw new IllegalArgumentException(\"start.mode must be one of \" + VALID + \", got: \" + cfg.getString(\"start.mode\"));","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Always use exact uppercase enum values from the Pulsar connector docs.","Validate mode strings against the documented set before job submission.","Pair SUBSCRIPTION/TIMESTAMP modes with their required companion options."],"tags":["pulsar","config-validation","start-cursor","enum"],"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-14T11:17:12.474Z"}