{"record":{"id":"a38098a5baba2852","repo":"apache/seatunnel","slug":"row-level-error-in-stage-plugin-on-tabl","errorCode":null,"errorMessage":"Row-level error in stage [{}], plugin [{}] on table [{}]: {}. TotalRecords={}, ErrorRecords={}","messagePattern":"Row-level error in stage \\[(.+?)\\], plugin \\[(.+?)\\] on table \\[(.+?)\\]: (.+?)\\. TotalRecords=(.+?), ErrorRecords=(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/error/ErrorHandler.java","lineNumber":114,"sourceCode":"                        ctx.getStage(),\n                        ctx.getPluginName(),\n                        ctx.getTableId(),\n                        t != null ? t.getMessage() : null,\n                        buildEx);\n            }\n        }\n\n        // Log error when LOG/ROUTE mode is enabled.\n        if (config.getMode() == ErrorHandlerMode.LOG\n                || config.getMode() == ErrorHandlerMode.ROUTE) {\n            try {\n                String stage = ctx.getStage();\n                String pluginName = ctx.getPluginName();\n                String tableId = ctx.getTableId();\n                String errorMessage = t != null ? t.getMessage() : null;\n\n                if (config.isIncludeStacktrace() && t != null) {\n                    log.warn(\n                            \"Row-level error in stage [{}], plugin [{}] on table [{}]: {}. TotalRecords={}, ErrorRecords={}\",\n                            stage,\n                            pluginName,\n                            tableId,\n                            errorMessage,\n                            counter.getTotalRecords(),\n                            currentErrorCount,\n                            t);\n                } else {\n                    log.warn(\n                            \"Row-level error in stage [{}], plugin [{}] on table [{}]: {}. TotalRecords={}, ErrorRecords={}\",\n                            stage,\n                            pluginName,\n                            tableId,\n                            errorMessage,\n                            counter.getTotalRecords(),\n                            currentErrorCount);\n                }","sourceCodeStart":96,"sourceCodeEnd":132,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/task/error/ErrorHandler.java#L96-L132","documentation":"ErrorHandler.onError logs every row-level exception it handles, with stage, plugin, table, counters, and (when config.isIncludeStacktrace() is true) the full stack trace at WARN level. This is the stacktrace-enabled branch — it does not itself fail the job; it records that a row was routed to error handling (skipped, written to error sink, etc.).","triggerScenarios":"A source/transform/sink throws a row-classified exception while ErrorHandler is active and includeStacktrace=true; the row is counted (ErrorRecords) and dispatched per the configured error-handling mode.","commonSituations":"Bad data rows failing type conversion or constraint checks; per-row write rejections (duplicate keys, row too large); debugging sessions where stacktrace logging was turned on to diagnose why rows land in the error sink.","solutions":["Inspect the stack trace to identify the offending row data pattern; fix upstream data quality if volume is high.","Watch TotalRecords/ErrorRecords metrics; if ErrorRecords approaches maxErrorRecords threshold, the job will fail — fix data or raise thresholds deliberately.","Set includeStacktrace=false in production to reduce log volume; keep it for debugging.","Route rows to an error sink so they can be replayed after correction instead of only logging them."],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// before enabling row error handling, estimate the error ratio on a sample\nlong total = inputCount();\nlong errs = errorCount();\nif (total > 0 && (double) errs / total > maxErrorRatio) {\n    throw new IllegalStateException(\"error ratio exceeds configured threshold: \" + errs + \"/\" + total);\n}","typeGuard":"null","tryCatchPattern":"null","preventionTips":["Validate/sanitize data upstream before the failing plugin","Set maxErrorRecords/maxErrorRatio deliberately, not by default","Enable error sink to capture failed rows for replay","Keep includeStacktrace=true only in debug environments"],"tags":["error-handling","logging","data-quality"],"backgroundTag":"row-error-classification","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"}