allthingssecurity opened a new pull request, #27308:
URL: https://github.com/apache/camel/pull/27308

   # Description
   
   [CAMEL-25279](https://issues.apache.org/jira/browse/CAMEL-25279)
   
   With `reply=false` the Knative HTTP consumer never has a response body, and 
without a body it always set `204 No Content`, overwriting the 500 it had just 
computed for a failed exchange. Knative takes a 2xx answer as a delivered 
event, so an event whose route failed was not retried (nor sent to a dead 
letter sink). CAMEL-24428 fixed the same overwrite for `muteException` with 
`reply=true`.
   
   This change: without a body the consumer sets 204 only when the exchange did 
not fail; a failed exchange keeps its error status, with an empty body. The 
upgrade guide for 4.23 gets a short note.
   
   Tests:
   - `KnativeHttpTest.testNoReplyFailure` (new, for the three CloudEvents 
versions): like `testNoReply`, with a route that throws.
   - Without the change it fails: `Expected status code <500> but was <204>`.
   - With the change all camel-knative-http tests pass: 176 tests, 0 failures.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [ ] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
     (I built and tested the affected module, including the formatter and 
import-sort plugins. I did not run the full root build.)
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
     This PR was prepared with Claude Code (Claude Opus 5.5). The commit 
carries a `Co-Authored-By` trailer.
   
   _Claude Code on behalf of allthingssecurity_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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