christophd commented on PR #5245:
URL: https://github.com/apache/camel-k/pull/5245#issuecomment-1997209935

   > is there anything we can do in the camel-k runtime maybe ? so in fact the 
operator won't have to change.
   
   I try to explain my findings:
   
   So the proper fix in my eyes would be to set the error handler on the route 
(just like Camel JBang does) instead of adding it as a global error handler 
(this is what the Camel K operator does). This is because since Camel 4.4 the 
raised error is handled by the NoErrorHandler on the route by default. So we 
need to set the error handler on the route when running with Camel 4.4 onwards.
   
   But unfortunately the Camel YAML DSL won't let me do this as it only 
supports to add the error handler as a global one on the Camel context. So we 
would need to change this on the Camel YAML DSL first and then let the operator 
set the error handler on the route.
   
   An alternative to all that would be to set this 
`camel.component.kamelet.noErrorHandler=false` property on the 
`application.properties` which makes Camel 4.4 behave like it was before and 
the global error handler will handle the errors.
   
   Unfortunately Camel K operator is keen on supporting both runtimes Camel < 
4.4.0 and 4.4.0+. So setting the property or adding the error handler to the 
route instead of global is dependent on the runtime version used to run the 
integration.
   
   Now you may give advice what and where to handle this. In the operator or in 
camel-k runtime layer.


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