oscerd commented on PR #28955:
URL: https://github.com/apache/camel/pull/28955#issuecomment-6588401525

   Thanks Claus, you are right: core has no Number, Boolean or StringBuilder to 
byte[] converter, so a body of `42` failed with `InvalidPayloadException` ("No 
type converter available"), where it used to be sent as `42`. 
`FunctionsProducer.getRequestBody` now sends a CharSequence, a Number or a 
Boolean as its text (UTF-8), as before this PR, and converts only the other 
bodies to bytes. The new parameterized `valueIsSentAsText` test covers an 
Integer, a Double, a BigDecimal, a Boolean and a StringBuilder; all five cases 
fail without the change. The body types now list `value`, and the doc and the 
upgrade guide say that text, a number or a boolean is still sent as text, so 
only a Map or a POJO fails.
   
   Good point. The "Invoking a function" section now says that when the 
exception is thrown the message body is still the request body, as in 
camel-http, with the status in `CamelAzureFunctionsStatusCode`. 
`serverErrorFailsTheExchange` now asserts it.
   
   _Claude Code on behalf of Andrea Cosentino (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]

Reply via email to