{"record":{"id":"b5d37159ed8741b4","repo":"apache/seatunnel","slug":"unsupported-error-handler-mode-s","errorCode":null,"errorMessage":"Unsupported error handler mode: %s","messagePattern":"Unsupported error handler mode: (.+?)","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/error/ErrorHandlerMode.java","lineNumber":37,"sourceCode":"\npublic enum ErrorHandlerMode {\n    DISABLE,\n    LOG,\n    ROUTE;\n\n    public static ErrorHandlerMode fromString(String value) {\n        if (value == null) {\n            return DISABLE;\n        }\n        switch (value.trim().toUpperCase()) {\n            case \"LOG\":\n                return LOG;\n            case \"ROUTE\":\n                return ROUTE;\n            case \"DISABLE\":\n                return DISABLE;\n            default:\n                throw new IllegalArgumentException(\"Unsupported error handler mode: \" + value);\n        }\n    }\n}\n","sourceCodeStart":19,"sourceCodeEnd":41,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/error/ErrorHandlerMode.java#L19-L41","documentation":"ErrorHandlerMode.fromString converts a configured string into the ErrorHandlerMode enum, accepting only LOG, ROUTE, and DISABLE. Any other value throws IllegalArgumentException 'Unsupported error handler mode'. This validates the top-level error-handler strategy selection.","triggerScenarios":"Setting the error-handler mode option to an unrecognized string such as 'IGNORE', 'log' lowercase (if exact match is required per source), 'retry', or a typo like 'DISBLE'.","commonSituations":"Users copy modes from other frameworks (e.g. Flink 'SKIP', Kafka 'DLQ') or typo the uppercase constant names.","solutions":["Set the mode to one of the supported values: LOG, ROUTE, or DISABLE.","Use the uppercase form exactly as the enum constant is spelled.","If a custom strategy is needed, implement it via the ROUTE target rather than inventing a mode name."],"exampleFix":"// before\nerror-handler.mode = \"IGNORE\"\n// after\nerror-handler.mode = \"LOG\"","handlingStrategy":"validation","validationCode":"Set<String> allowed = Set.of(\"LOG\", \"ROUTE\", \"DISABLE\");\nString mode = cfg.get(\"error-handler.mode\");\nif (mode != null && !allowed.contains(mode)) {\n    throw new IllegalArgumentException(\"Unsupported error handler mode: \" + mode);\n}","typeGuard":"boolean isValidErrorHandlerMode(String s) {\n    return \"LOG\".equals(s) || \"ROUTE\".equals(s) || \"DISABLE\".equals(s);\n}","tryCatchPattern":"try {\n    ErrorHandlerMode m = ErrorHandlerMode.fromString(value);\n} catch (IllegalArgumentException e) {\n    log.error(\"Bad mode '{}'; use LOG, ROUTE, or DISABLE\", value);\n}","preventionTips":["Use exact uppercase enum names","Refer to the option's documentation for the allowed set","Avoid copying mode names from other frameworks"],"tags":["config","enum","error-handler"],"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-23T08:17:48.524Z"}