goutamadwant opened a new pull request, #12085: URL: https://github.com/apache/seatunnel/pull/12085
### Purpose of this pull request Closes #12083. This PR makes Amazon SQS JSON deserialization failures use the connector's existing error boundary consistently. The change: - wraps JSON-format failures carrying `CommonErrorCode.JSON_OPERATION_FAILED` with `AmazonSqsConnectorException` and `AmazonSqs-01`; - preserves the original `COMMON-02` exception and parser failure in the cause chain; - limits the catch boundary to schema deserialization; - leaves unrelated runtime failures unchanged; and - adds regression coverage for both the wrapped JSON path and the non-JSON runtime boundary. Downstream collector failures remain outside the deserializer's catch scope. `AmazonSqsSourceReader` still deletes a message only after collection succeeds. ### Does this PR introduce _any_ user-facing change? Yes, for error diagnostics only. With `format = json` and `ignore_parse_errors = false`, malformed JSON now surfaces as `AmazonSqsConnectorException` with error code `AmazonSqs-01`. Previously, the format's `SeaTunnelRuntimeException` with `COMMON-02` escaped directly. Failure, retry, and deletion behavior are unchanged: the poll aborts before collection or deletion, and the original `COMMON-02` exception remains available as the cause. Existing `ignore_parse_errors = true` behavior is also unchanged. ### How was this patch tested? - Reproduced the unfixed behavior on Java 8 and Java 11: the factory-to-reader path received `SeaTunnelRuntimeException`/`COMMON-02` instead of `AmazonSqsConnectorException`/`AmazonSqs-01`. - Java 8: the complete `connector-amazonsqs` module passed, 12/12 tests. - Java 11: the complete `connector-amazonsqs` module passed, 12/12 tests. - The new tests verify the outer connector error code and message, the preserved JSON cause chain, and that no row is emitted or message deleted. - A negative regression verifies that a non-JSON `SeaTunnelRuntimeException` remains unchanged even when parse errors are ignored, with no output or deletion. - Java 11 module verification with tests skipped passed, including compilation, packaging, and Spotless. - `git diff --check` passed. The tests use a deterministic in-memory SQS client boundary and make no network calls. ### Check list * [x] No new Jar binary package or dependency is added. * [x] No documentation update is required because no option, default, or message-processing behavior changes. * [x] No incompatible change is introduced, so `incompatible-changes.md` does not require an update. * [x] Plugin mapping, distribution POM, CI labels, E2E wiring, and plugin configuration remain unchanged because this is a focused error-reporting fix for an existing connector. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
