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


##########
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:
   Suggestion (non-blocking): many users define `onException` at the 
`RouteBuilder` level or in a route configuration, not per route. Those clauses 
apply to the called route too, so in that case the clause *does* run, once, in 
the called route's error handler. A sentence about this could stop readers from 
concluding that their global `onException` never runs for a called route. For 
example:
   
   > An `onException` defined for all routes (in the `RouteBuilder` or in a 
route configuration) is also part of the error handler of the called route, so 
it runs there, once, and not again in the calling route.



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