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

   JIRA: [CAMEL-26813](https://issues.apache.org/jira/browse/CAMEL-26813)
   
   ## What
   
   When route A calls route B with `direct` (or `seda` InOut) and B fails, B's 
error handler deals with the failure. Once it is done, the error handlers and 
`onException` clauses of A do not run for that failure. This holds even when B 
only has the default error handler. Users expect A's `onException` to run, and 
the user manual does not explain this anywhere.
   
   - `error-handler.adoc`: new section **Error handling across routes**, right 
after "Scopes", covering:
     - the rule;
     - what the calling route sees when the called route does not handle, 
handles (dead letter channel or `handled(true)`), or continues the failure;
     - an exception thrown from the called route's `onException`;
     - SEDA InOut;
     - the two ways to deal with the failure in the calling route: 
`errorHandler(noErrorHandler())` on the called route, at the cost of its own 
redeliveries and `onException` (links the existing "retry an entire route" 
section), or `doTry ... doCatch` in the calling route;
     - one example in Java, XML and YAML.
   - `exception-clause.adoc` ("Scopes") and `try-catch-finally.adoc`: short 
cross-links to the new section.
   - `eip-samples.json`: regenerated, because the new YAML example is a sample 
of `errorHandler`.
   
   The section does not describe what happens after a `doCatch` caught the 
failure of a called route. CAMEL-26447 (in progress) is about that and may 
change it.
   
   ## Tests
   
   - New `ErrorHandlingAcrossRoutesTest` (camel-core). It pins each statement 
of the section, with `direct` and with `seda` InOut, plus a seda InOnly 
control: 17 tests, all pass on main.
   - Related existing tests also pass: `RedeliverToSubRouteTest`, 
`DoCatchDirectRouteTest`, `OnExceptionContinueSubRouteTest`, 
`OnExceptionCallSubRouteNoErrorHandlerTest`, `DoTryCalledRouteErrorHandlerTest`.
   - Doc example checks all pass: `CatalogDocJavaExamplesTest`, 
`CatalogDocExamplesTest`, `CatalogSamplesTest`, `CatalogDocsTest`, 
`CatalogDocExcerptTest` (camel-jbang-core), `UserManualDocExamplesTest` 
(camel-yaml-dsl-validator), `DocExamplesXmlSchemaTest` and 
`DocExamplesJavaImportsTest` (camel-catalog). To make sure the new examples 
really are checked, I broke each of them on purpose: 
`CatalogDocJavaExamplesTest` failed for the Java one, 
`DocExamplesXmlSchemaTest` for the XML one, and `UserManualDocExamplesTest` for 
the YAML one.
   
   _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