[
https://issues.apache.org/jira/browse/CAMEL-22907?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Bruno Gonçalves updated CAMEL-22907:
------------------------------------
Attachment: image-2026-01-26-15-08-06-642.png
> 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: 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.
> !https://private-user-images.githubusercontent.com/23716892/540448876-38a87259-ce18-49a5-875e-7acf3dd82ddd.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzU4OTAsIm5iZiI6MTc2OTQzNTU5MCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NDg4NzYtMzhhODcyNTktY2UxOC00OWE1LTg3NWUtN2FjZjNkZDgyZGRkLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNTMxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWU4YTQxMzEwOWNmZDE1ZTM5MDAzZjg0MmM0ZGFiOGY4NGI1MDViMTU1N2U1MGUyNGM1NDYyM2I5NmJiYThlODImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.Vv5djaLtNdgFS3NAOgADHg_hCrj-Z3lPWTiOaiD4TGQ!
> *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.
> !https://private-user-images.githubusercontent.com/23716892/540454615-c5e09bf4-dd25-4fd4-9ac1-5779d4484448.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzU4OTAsIm5iZiI6MTc2OTQzNTU5MCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NTQ2MTUtYzVlMDliZjQtZGQyNS00ZmQ0LTlhYzEtNTc3OWQ0NDg0NDQ4LmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNTMxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThkZDVhZjkyYTVlZTIwMTJlY2I1ZDE3MDgzYjg5MzE5ZDNkMzNkNWJkZWMyYTRlYjA4NzM2NWU4ZTU1YTU4MGYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.2wtj4vQ9rttq2Tt7F8E14MeHPoIRAvQJIte9RNU3Ojo!
> *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).
> !https://private-user-images.githubusercontent.com/23716892/540454810-d299e460-228b-49dd-9d97-e7bb6ad5d74e.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzU4OTAsIm5iZiI6MTc2OTQzNTU5MCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NTQ4MTAtZDI5OWU0NjAtMjI4Yi00OWRkLTlkOTctZTdiYjZhZDVkNzRlLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNTMxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRkNzk1ODQ1ZmRlZmMwYjk2MTNjZTc5YjQ1MWI0MDMzZWEzN2FiZGQ4YzViMDAwZmJjZWNiNTdhNWVjM2IyNWMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.j3Qpor6BCb0IG2inXpbTBvZ22LQ4FGA9yQBO9_GDITM!
> *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.
> !https://private-user-images.githubusercontent.com/23716892/540454927-35f4aac5-b048-459f-b69a-a01030c153de.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Njk0MzU4OTAsIm5iZiI6MTc2OTQzNTU5MCwicGF0aCI6Ii8yMzcxNjg5Mi81NDA0NTQ5MjctMzVmNGFhYzUtYjA0OC00NTlmLWI2OWEtYTAxMDMwYzE1M2RlLmpwZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNjAxMjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjYwMTI2VDEzNTMxMFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWNmODQzMmQ4ZjlhMjk4MGQ1MTRiZWQ1MTk0NjljNTJmNGRjOTNiNGJmZTY4YzAyNmJiN2Q5OWI3MzI3YWVmNDkmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.wZKAgGBkCiKk57pGtec5BGBVT4WK891cWk3FnfluBFY!
> *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)