[ 
https://issues.apache.org/jira/browse/CAMEL-22907?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18054370#comment-18054370
 ] 

Bruno Gonçalves commented on CAMEL-22907:
-----------------------------------------

Reproducer on attach.

The exchange stops in the {{subrouteErrorHandler}} route and never reaches the 
{{subroute2ErrorHandler}} route.

 
 
{noformat}
Message History (source location and message history is disabled) 
---------------------------------------------------------------------------------------------------------------------------------------
 Source                                   ID                             
Processor                                          Elapsed (ms)                 
                         imapConsumerRoute/imapConsumer 
from[imap://mail.outlook.com:993?bridgeErrorHandle           14 ...             
                             subrouteErrorHandler/log2      log[Subroute 
received failed exchange: ${exception            0{noformat}

> Consumer errors with bridgeErrorHandler=true and handled=false do not 
> propagate to subroutes
> --------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-22907
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22907
>             Project: Camel
>          Issue Type: Bug
>    Affects Versions: 4.10.8
>            Reporter: Bruno Gonçalves
>            Priority: Minor
>         Attachments: error-handler-reproducer.zip, 
> image-2026-01-26-15-07-43-377.png, image-2026-01-26-15-08-06-642.png, 
> image-2026-01-26-15-08-13-916.png, image-2026-01-26-15-08-20-169.png, 
> image-2026-01-26-15-08-26-808.png
>
>
> *Description:*
> We have identified a behavior in Apache Camel that does not match the 
> expected error propagation when using consumers with 
> {{bridgeErrorHandler=true}} and an error handler configured with 
> {{{}handled=false{}}}.
> *Problem:*
> When an error occurs in a consumer, the error is sent to the configured error 
> handler. If the error handler sets {{{}handled=false{}}}, the exchange *does 
> not continue to a subroute* for further processing, unlike other error 
> scenarios.
> *Impact:*
>  * The exchange is marked as failed (correct), but processing stops before 
> reaching configured subroutes.
>  * This breaks reuse of subroutes for error handling logic and affects 
> integration flows where error handling needs to occur in a centralized 
> subroute while keeping the exchange in a failed state.
> *Steps to Reproduce:*
> We created four use cases:
> *Use Case 1 – Error during exchange ({color:#00875a}working{color})*
>  # Error occurs in route 2.
>  # Error is sent to error handler with {{{}handled=false{}}}.
>  # Error is sent further to subroute.
> !image-2026-01-26-15-07-43-377.png!
> *Use Case 2 – Error in consumer with bridgeErrorHandler=false 
> ({color:#00875a}working{color})*
>  # Error occurs in consumer.
>  # Error is *not* sent to error handler.
> !image-2026-01-26-15-08-06-642.png!
> *Use Case 3 – Error in consumer with bridgeErrorHandler=true / handled=true 
> ({color:#00875a}working{color})*
>  # Error occurs in consumer.
>  # Error is sent to error handler with {{{}handled=true{}}}.
>  # Error is sent to subroute.
> !image-2026-01-26-15-08-13-916.png!
> *Use Case 4 – Error in consumer with bridgeErrorHandler=true / handled=false 
> ({color:#de350b}not working{color})*
>  # Error occurs in consumer.
>  # Error is sent to error handler with {{{}handled=false{}}}.
>  # *Error is not sent to subroute* (unexpected).
> !image-2026-01-26-15-08-20-169.png!
> *Expected Behavior:*
>  * In Use Case 4, the exchange should reach the subroute, similar to Use Case 
> 1, while keeping the exchange in a failed state.
> !image-2026-01-26-15-08-26-808.png!
> *Observed Behavior:*
>  * Exchange does not continue to the subroute.
>  * Exchange remains in failed state but bypasses the subroute.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to