apache/seatunnel · error · IllegalArgumentException
input.on-error must be "skip" or "fail".
Error message
input.on-error must be "skip" or "fail".
What it means
The input.on-error option controls whether the reader skips errored files/records or fails the input. FileCollectConfig.validateOnError accepts only "skip" or "fail" (case-insensitive); any other string throws this IllegalArgumentException.
Source
Thrown at seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java:135
public static FileCollectConfig from(ReadonlyConfig config) {
return new FileCollectConfig(config);
}
public boolean isMultilineEnabled() {
return multilinePattern != null && !multilinePattern.isEmpty();
}
public boolean isJsonOutput() {
return "json".equalsIgnoreCase(outputType);
}
public boolean isSkipOnError() {
return !"fail".equalsIgnoreCase(onError);
}
private static void validateOnError(String value) {
if (!value.equalsIgnoreCase("skip") && !value.equalsIgnoreCase("fail")) {
throw new IllegalArgumentException("input.on-error must be \"skip\" or \"fail\".");
}
}
private static void validateMultilineMatch(String value) {
if (!value.equalsIgnoreCase("after") && !value.equalsIgnoreCase("before")) {
throw new IllegalArgumentException(
"input.multiline.match must be \"after\" or \"before\".");
}
}
private static void validateOutputType(String value) {
if (!value.equalsIgnoreCase("line") && !value.equalsIgnoreCase("json")) {
throw new IllegalArgumentException(
"input.output-format.type must be \"line\" or \"json\".");
}
}
private static Charset resolveCharset(String encodingName, String inputId) {View on GitHub (pinned to cf67b549a7)
Solutions
- Change input.on-error to "skip" (continue on per-file errors)
- Change input.on-error to "fail" (abort on errors)
- Check spelling and casing — matching is case-insensitive so only the word itself matters
Example fix
# before input.on-error = "ignore" # after input.on-error = "skip"
Defensive patterns
Strategy: validation
Validate before calling
String onError = cfg.get(FileCollectOptions.ON_ERROR);
if (!"skip".equalsIgnoreCase(onError) && !"fail".equalsIgnoreCase(onError)) { throw new IllegalArgumentException("on-error must be skip or fail"); } Try / catch
try { FileCollectConfig.from(config); } catch (IllegalArgumentException e) { log.error("on-error invalid: {}", e.getMessage()); } Prevention
- Restrict generated configs to the fixed vocabulary {skip, fail}
- Remember matching is case-insensitive; only spelling matters
- Avoid importing on-error keywords from other log collectors
When it happens
Trigger: Setting input.on-error to values like "ignore", "continue", "warn", "abort", or a misspelled variant.
Common situations: Users porting configs from other tools (e.g. Logstash/Fluentd vocabulary) whose error-handling keywords differ.
Understand the failure class
Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.
Related errors
- Unknown format type:
- Unknown ftp connection mode: ${mode}
- input.multiline.match must be "after" or "before".
- input.output-format.type must be "line" or "json".
- Unsupported agent.delivery-guarantee: ${value}. Supported: B
AI-assisted analysis of apache/seatunnel@cf67b549a7 (2026-09-10).
Data as JSON: /api/errors/83653662ebc89751.
Report an issue: GitHub.