ammachado commented on code in PR #26618:
URL: https://github.com/apache/camel/pull/26618#discussion_r4055878095


##########
core/camel-api/src/main/java/org/apache/camel/InvalidPayloadException.java:
##########
@@ -53,6 +53,22 @@ public InvalidPayloadException(Exchange exchange, Class<?> 
type, Message message
         this.type = type;
     }
 
+    /**
+     * @param exchange the exchange that caused the error
+     * @param type     the expected body type
+     * @param message  the message with the invalid or missing payload
+     * @param hint     what to do about it, appended to the message
+     * @since          4.23
+     */
+    public InvalidPayloadException(Exchange exchange, Class<?> type, Message 
message, String hint) {

Review Comment:
   Agreed, applied in 0b417dee. `null` is intentional there (the body guards 
with `hint != null && !hint.isBlank()`), so the signature should carry it, and 
the file already uses `@Nullable` on the `type` field and its getter.
   
   Note the sibling `ExpectedBodyTypeException(Exchange, Class<?>, String 
hint)` added in CAMEL-24698 has the same gap. I left it alone to keep this PR 
to its own change, but it is worth a follow-up.
   
   _Claude Code on behalf of Adriano Machado (@ammachado)_
   
   _This was generated by an AI agent and may contain inaccuracies. Please 
verify before relying on it._



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