{"record":{"id":"a2e096a9169db73b","repo":"apache/seatunnel","slug":"conditional-s-not-found-in-options","errorCode":null,"errorMessage":"Conditional '%s' not found in options.","messagePattern":"Conditional '(.+?)' not found in options\\.","errorType":"validation","errorClass":"org.apache.seatunnel.api.configuration.util.OptionValidationException","httpStatus":null,"severity":"error","filePath":"seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/OptionRule.java","lineNumber":585,"sourceCode":"                                            currentOptionType,\n                                            option.key(),\n                                            requiredOption.getClass().getSimpleName()));\n                        }\n                    });\n        }\n\n        private void verifyConditionalExists(@NonNull Option<?> option) {\n            boolean inOptions = optionalOptions.contains(option);\n            AtomicBoolean inRequired = new AtomicBoolean(false);\n            requiredOptions.forEach(\n                    requiredOption -> {\n                        if (requiredOption.getOptions().contains(option)) {\n                            inRequired.set(true);\n                        }\n                    });\n\n            if (!inOptions && !inRequired.get()) {\n                throw new OptionValidationException(\n                        String.format(\"Conditional '%s' not found in options.\", option.key()));\n            }\n        }\n    }\n\n    @Getter\n    @AllArgsConstructor\n    private enum CurrentOptionType {\n        OPTIONS_OPTION(\"OptionsOption\"),\n        OPTIONS_OPTION_WITH_CONSTRAINT(\"OptionsOptionWithConstraint\");\n\n        private final String type;\n    }\n}\n","sourceCodeStart":567,"sourceCodeEnd":600,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/OptionRule.java#L567-L600","documentation":"Fired by verifyConditionalExists while a conditional rule is being assembled: an Option used as the condition (or inside a ConditionalRequiredOptions expression) was never declared in optionalOptions or requiredOptions of the same OptionRule. The conditional references an option key the rule does not own, so the condition could never be evaluated against user config.","triggerScenarios":"Thrown at seatunnel-api/src/main/java/org/apache/seatunnel/api/configuration/util/OptionRule.java:585 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the missing option to the rule via optional(...) or required(...) so the condition is satisfiable","Remove the stale conditional entry if the option no longer exists in the factory's config surface","Re-check copy-pasted conditional rules that reference options from a different connector factory"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}