Croway commented on code in PR #29562:
URL: https://github.com/apache/camel/pull/29562#discussion_r4525547165


##########
docs/user-manual/modules/ROOT/pages/error-handler.adoc:
##########
@@ -225,6 +225,120 @@ RouteBuilder builder = new RouteBuilder() {
 };
 ----
 
+== Error handling across routes
+
+When a route calls another route, such as with 
xref:components::direct-component.adoc[Direct], a failure in the
+called route is dealt with by the error handler of the called route, the route 
where it happened: its redeliveries,
+its `onException` clauses and its dead letter channel. Once that error handler 
is done with the failure, the error
+handlers of the calling routes do not deal with it again: they do not 
redeliver, and their `onException` clauses do
+not run for it. This also applies when the called route has only the default 
error handler, without any
+`onException`.

Review Comment:
   Good point, added in 0a6a5185a1ef. One nuance to the suggested wording: an 
`onException` defined in a `RouteBuilder` only applies to the routes of that 
`RouteBuilder`. When the called route is in another `RouteBuilder` (one builder 
per route is common), the caller's clause does not run at all, so the new 
paragraph says that too. The `RouteBuilder`, route-configuration and 
other-`RouteBuilder` cases are covered in `ErrorHandlingAcrossRoutesTest`.
   
   _Claude Code on behalf of Federico Mariani_
   



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