waterWang opened a new pull request, #25166: URL: https://github.com/apache/camel/pull/25166
## CAMEL-24264: throw IllegalArgumentException when `pojoRequest=true` with wrong body type **Problem:** With `pojoRequest=true`, `Translate2Producer.translateText` only acted when the body was a `TranslateTextRequest`. Any other body type fell through the `instanceof` with no `else`, so no AWS call was made, no response was set, and the original body was returned silently — making the bug extremely hard to debug. **Fix:** Add an `else` branch in the POJO mode `if` block that throws `IllegalArgumentException`, making the failure visible immediately. **Scope:** Only the `pojoRequest=true` path. The non-POJO path (String body) is unchanged — it already handles its input validation separately. -- 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]
