oscerd opened a new pull request, #25278: URL: https://github.com/apache/camel/pull/25278
Child of CAMEL-24261 (completing CAMEL-23462 across the AWS2 producers). ## Problem Most `BedrockAgent` / `BedrockAgentRuntime` operations already fail fast when `pojoRequest=true` and the body is not the expected request type. Four did not — they fell through the `instanceof` with no `else`, so no AWS call was made, no response was set, and the original body was returned with no error: - `BedrockAgentProducer`: `startIngestionJob`, `listIngestionJobs`, `getIngestionJob` - `BedrockAgentRuntimeProducer`: `retrieveAndGenerate` (`BedrockProducer` in the runtime package is already covered by CAMEL-23462.) ## Fix Each of the four branches now throws `IllegalArgumentException`, matching the wording the sibling operations in the same module already use, e.g. `"retrieveAndGenerate operation requires a RetrieveAndGenerateRequest body when pojoRequest=true"`. ## Tests `camel-aws-bedrock` has no producer route/mock harness, so this is covered by two new Mockito unit tests that mock the endpoint + client, send a wrong-typed body with `pojoRequest=true`, and assert the `IllegalArgumentException`. Each was verified to fail (silent no-op) before the fix. Region-free — no localstack or real AWS. ## Docs / backport The shared 4.22 upgrade-guide entry was added with CAMEL-24263. Main only, matching the CAMEL-23462 precedent (behaviour change, shipped in a minor, not backported). --- _Claude Code on behalf of oscerd_ -- 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]
