{"record":{"id":"83653662ebc89751","repo":"apache/seatunnel","slug":"input-on-error-must-be-skip-or-fail","errorCode":null,"errorMessage":"input.on-error must be \"skip\" or \"fail\".","messagePattern":"input\\.on-error must be \"skip\" or \"fail\"\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java","lineNumber":135,"sourceCode":"    public static FileCollectConfig from(ReadonlyConfig config) {\n        return new FileCollectConfig(config);\n    }\n\n    public boolean isMultilineEnabled() {\n        return multilinePattern != null && !multilinePattern.isEmpty();\n    }\n\n    public boolean isJsonOutput() {\n        return \"json\".equalsIgnoreCase(outputType);\n    }\n\n    public boolean isSkipOnError() {\n        return !\"fail\".equalsIgnoreCase(onError);\n    }\n\n    private static void validateOnError(String value) {\n        if (!value.equalsIgnoreCase(\"skip\") && !value.equalsIgnoreCase(\"fail\")) {\n            throw new IllegalArgumentException(\"input.on-error must be \\\"skip\\\" or \\\"fail\\\".\");\n        }\n    }\n\n    private static void validateMultilineMatch(String value) {\n        if (!value.equalsIgnoreCase(\"after\") && !value.equalsIgnoreCase(\"before\")) {\n            throw new IllegalArgumentException(\n                    \"input.multiline.match must be \\\"after\\\" or \\\"before\\\".\");\n        }\n    }\n\n    private static void validateOutputType(String value) {\n        if (!value.equalsIgnoreCase(\"line\") && !value.equalsIgnoreCase(\"json\")) {\n            throw new IllegalArgumentException(\n                    \"input.output-format.type must be \\\"line\\\" or \\\"json\\\".\");\n        }\n    }\n\n    private static Charset resolveCharset(String encodingName, String inputId) {","sourceCodeStart":117,"sourceCodeEnd":153,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-edge-agent/seatunnel-edge-agent-connector/src/main/java/org/apache/seatunnel/edge/agent/connector/config/FileCollectConfig.java#L117-L153","documentation":"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.","triggerScenarios":"Setting input.on-error to values like \"ignore\", \"continue\", \"warn\", \"abort\", or a misspelled variant.","commonSituations":"Users porting configs from other tools (e.g. Logstash/Fluentd vocabulary) whose error-handling keywords differ.","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"],"exampleFix":"# before\ninput.on-error = \"ignore\"\n# after\ninput.on-error = \"skip\"","handlingStrategy":"validation","validationCode":"String onError = cfg.get(FileCollectOptions.ON_ERROR);\nif (!\"skip\".equalsIgnoreCase(onError) && !\"fail\".equalsIgnoreCase(onError)) { throw new IllegalArgumentException(\"on-error must be skip or fail\"); }","typeGuard":null,"tryCatchPattern":"try { FileCollectConfig.from(config); } catch (IllegalArgumentException e) { log.error(\"on-error invalid: {}\", e.getMessage()); }","preventionTips":["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"],"tags":["config","validation","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-14T05:17:10.506Z"}