{"record":{"id":"ec054a778b83e2c5","repo":"apache/seatunnel","slug":"unsupported-plugin-type-plugintype-only-sou","errorCode":null,"errorMessage":"Unsupported plugin type '${pluginType}'. Only 'source', 'sink' and 'transform' are supported.","messagePattern":"Unsupported plugin type '(.+?)'\\. Only 'source', 'sink' and 'transform' are supported\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":400,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/OptionRulesService.java","lineNumber":206,"sourceCode":"                });\n    }\n\n    private PluginType parseSupportedPluginType(String pluginTypeText) {\n        if (StringUtils.isBlank(pluginTypeText)) {\n            throw new IllegalArgumentException(\n                    String.format(\"Parameter '%s' cannot be empty.\", PARAM_TYPE));\n        }\n        String normalizedPluginType = pluginTypeText.trim();\n        if (StringUtils.equalsIgnoreCase(normalizedPluginType, PluginType.SOURCE.getType())) {\n            return PluginType.SOURCE;\n        }\n        if (StringUtils.equalsIgnoreCase(normalizedPluginType, PluginType.SINK.getType())) {\n            return PluginType.SINK;\n        }\n        if (StringUtils.equalsIgnoreCase(normalizedPluginType, PluginType.TRANSFORM.getType())) {\n            return PluginType.TRANSFORM;\n        }\n        throw new IllegalArgumentException(\n                String.format(\n                        \"Unsupported plugin type '%s'. Only '%s', '%s' and '%s' are supported.\",\n                        normalizedPluginType,\n                        PluginType.SOURCE.getType(),\n                        PluginType.SINK.getType(),\n                        PluginType.TRANSFORM.getType()));\n    }\n\n    private String normalizePluginName(String pluginName) {\n        if (StringUtils.isBlank(pluginName)) {\n            throw new IllegalArgumentException(\n                    String.format(\"Parameter '%s' cannot be empty.\", PARAM_PLUGIN));\n        }\n        return pluginName.trim().toLowerCase(Locale.ROOT);\n    }\n\n    private OptionRuleResponse.RequiredOptionMetadata toRequiredOptionMetadata(\n            RequiredOption requiredOption) {","sourceCodeStart":188,"sourceCodeEnd":224,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/service/OptionRulesService.java#L188-L224","documentation":"After trimming the 'type' parameter, parseSupportedPluginType matches it case-insensitively against the supported values source, sink, and transform. Any other value falls through and throws this IllegalArgumentException enumerating the only accepted values.","triggerScenarios":"GET /option-rules?type=foo (misspelled or unsupported value such as 'Processor', 'transformv2', 'input').","commonSituations":"Confusion with Flink/Spark terminology (input/output/processor) when querying SeaTunnel option rules; typos like 'souce'; camelCase or prefixed names not matching the accepted tokens; copying type values from other SeaTunnel APIs with broader enums.","solutions":["Set type to exactly one of: source, sink, transform (case-insensitive).","Map legacy connector terminology to SeaTunnel types (input->source, output->sink, processor->transform) before calling.","Add client-side validation of the type value against the three accepted tokens."],"exampleFix":"// before\ncurl 'http://host:8080/option-rules?type=processor'\n// after\ncurl 'http://host:8080/option-rules?type=transform'","handlingStrategy":"validation","validationCode":"const VALID = [\"source\", \"sink\", \"transform\"];\nif (!VALID.includes((type || \"\").trim().toLowerCase())) throw new Error(\"type must be one of \" + VALID.join(\", \"));\n","typeGuard":"function isSupportedPluginType(v) {\n  return [\"source\", \"sink\", \"transform\"].includes(String(v).trim().toLowerCase());\n}","tryCatchPattern":"try { fetchOptionRules(type); } catch (IllegalArgumentException e) { if (e.getMessage().startsWith(\"Unsupported plugin type\")) { throw new UserInputError(e.getMessage()); } throw e; }","preventionTips":["Map foreign terminology (input/output/processor) to source/sink/transform before calling the API.","Use a dropdown/constant list rather than free text for the type parameter.","Validate user input case-insensitively against the three supported tokens."],"tags":["rest-api","validation","enum","plugin"],"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-14T21:17:11.552Z"}