gnodet commented on code in PR #25255:
URL: https://github.com/apache/camel/pull/25255#discussion_r3682873658


##########
components/camel-aws/camel-aws2-eventbridge/src/main/java/org/apache/camel/component/aws2/eventbridge/EventbridgeProducer.java:
##########
@@ -155,6 +155,9 @@ private void putRule(EventBridgeClient eventbridgeClient, 
Exchange exchange) thr
                 Message message = getMessageForResponse(exchange);
                 message.setBody(result);
                 message.setHeader(EventbridgeConstants.RULE_ARN, 
result.ruleArn());
+            } else {
+                throw new IllegalArgumentException(

Review Comment:
   Minor: the error message format differs from the `executeOperation` helper 
(lines 477-480) which uses `String.format("Expected body of type %s but was 
%s", ...)`. Consider either migrating `putRule` to use `executeOperation` (like 
all other operations in this class already do) or matching the error message 
format for consistency and debuggability.



-- 
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]

Reply via email to