{"record":{"id":"725faad629c94fd2","repo":"apache/seatunnel","slug":"input-output-format-type-must-be-line-or-json","errorCode":null,"errorMessage":"input.output-format.type must be \"line\" or \"json\".","messagePattern":"input\\.output-format\\.type must be \"line\" or \"json\"\\.","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":148,"sourceCode":"        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) {\n        try {\n            return Charset.forName(encodingName);\n        } catch (IllegalCharsetNameException | UnsupportedCharsetException e) {\n            throw new IllegalArgumentException(\n                    \"input.encoding is not supported: \"\n                            + encodingName\n                            + \" (input id=\"\n                            + inputId\n                            + \")\",\n                    e);\n        }\n    }\n}","sourceCodeStart":130,"sourceCodeEnd":166,"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#L130-L166","documentation":"input.output-format.type selects how each collected item is emitted: as a raw \"line\" or a parsed \"json\" object. FileCollectConfig.validateOutputType accepts only these two values (case-insensitive) and throws this IllegalArgumentException for anything else.","triggerScenarios":"Setting input.output-format.type to values like \"text\", \"raw\", \"string\", \"ndjson\", or a mistyped value.","commonSituations":"Users expecting auto-detection of JSON output, or copying option names from other connectors with different format vocabularies.","solutions":["Set input.output-format.type to \"line\" for raw line emission","Set input.output-format.type to \"json\" for parsed-JSON output","Check spelling — the validator is case-insensitive but exact-word only"],"exampleFix":"# before\ninput.output-format.type = \"text\"\n# after\ninput.output-format.type = \"line\"","handlingStrategy":"validation","validationCode":"String type = cfg.get(FileCollectOptions.OUTPUT_FORMAT_TYPE);\nif (!\"line\".equalsIgnoreCase(type) && !\"json\".equalsIgnoreCase(type)) { throw new IllegalArgumentException(\"output-format.type must be line or json\"); }","typeGuard":null,"tryCatchPattern":"try { FileCollectConfig.from(config); } catch (IllegalArgumentException e) { log.error(\"output-format.type invalid: {}\", e.getMessage()); }","preventionTips":["Use only line or json for output-format.type","Do not expect auto format detection","Keep option value lists centralized for generators"],"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"}