apache/seatunnel · warning
Invalid option rules request, type: {}, plugin: {}, error: {
Error message
Invalid option rules request, type: {}, plugin: {}, error: {} What it means
OptionRulesServlet.doGet validates the 'type' and 'query' parameters against optionRulesService.getOptionRules(); when they are invalid (IllegalArgumentException) it logs this warning and returns HTTP 400 with an error JSON body. The requested plugin type or plugin name does not map to a known option-rules entry.
Source
Thrown at seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/servlet/OptionRulesServlet.java:53
public class OptionRulesServlet extends BaseServlet {
private final OptionRulesService optionRulesService;
public OptionRulesServlet(NodeEngineImpl nodeEngine) {
super(nodeEngine);
this.optionRulesService = new OptionRulesService(nodeEngine);
}
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp)
throws ServletException, IOException {
Map<String, String> params = getParameterMap(req);
String pluginType = params.get("type");
String pluginName = params.get("plugin");
try {
writeJson(resp, optionRulesService.getOptionRules(pluginType, pluginName));
} catch (IllegalArgumentException e) {
log.warn(
"Invalid option rules request, type: {}, plugin: {}, error: {}",
pluginType,
pluginName,
e.getMessage());
writeJson(resp, errorResponse(e.getMessage()), HttpServletResponse.SC_BAD_REQUEST);
} catch (NoSuchElementException e) {
log.info("Option rules plugin not found, type: {}, plugin: {}", pluginType, pluginName);
writeJson(resp, errorResponse(e.getMessage()), HttpServletResponse.SC_NOT_FOUND);
} catch (RuntimeException e) {
log.error(
"Failed to load option rules, type: {}, plugin: {}", pluginType, pluginName, e);
writeJson(
resp,
errorResponse("Failed to load option rules."),
HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
}
}
View on GitHub (pinned to cf67b549a7)
Solutions
- Check the type parameter is one of the supported values (source, sink, transform) and spelled correctly.
- Verify the plugin identifier matches the factory name (e.g. 'FakeSource', 'Jdbc') and the plugin jar is installed on the queried node.
- Read the error message returned in the 400 body — IllegalArgumentException.getMessage() explains which parameter was invalid.
- Use the plugin discovery endpoints to list available factories before querying option rules.
Example fix
// before curl 'http://host:8080/option-rules/?type=sources&plugin=FakeSource' // after curl 'http://host:8080/option-rules/?type=source&plugin=FakeSource'
Defensive patterns
Strategy: validation
Validate before calling
const TYPES = ['source','sink','transform'];
function validOptionRulesQuery(type, plugin) {
return TYPES.includes(type) && typeof plugin === 'string' && plugin.length > 0;
} Try / catch
try { const rules = await fetchOptionRules(type, plugin); } catch (e) { /* 400: read e.body message for which param was invalid */ } Prevention
- Validate type is exactly one of source/sink/transform
- Use the exact factory name for the plugin parameter (e.g. FakeSource, Jdbc)
- Confirm the plugin jar is installed on the queried node
When it happens
Trigger: GET /option-rules/ with a 'type' that is not a valid plugin type (source/sink/transform) or a 'plugin' name that fails validation — e.g. missing plugin name for a type that requires one, or unknown plugin identifier.
Common situations: Hand-built REST queries with typos in the plugin factory identifier; querying a plugin not installed on the node; using an old plugin name after it was renamed or moved; forgetting the 'plugin' parameter entirely.
Understand the failure class
Background: "Invalid query parameter" / "Failed to parse value of ...": fixing bad query string parameters across APIs — this error's family across 36 libraries.
Related errors
- Parameter 'pluginName' cannot be empty.
- Unsupported required option type: ${requiredOptionClassName}
- The jobId must not be empty.
- The jobId must not be empty.
- The jobId must not be empty.
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/417e2d3f4d7f2121.
Report an issue: GitHub.