You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2025/06/24 13:15:00 UTC
[jira] [Commented] (CAMEL-22195) camel-resilience4j - record exception should handle wrapped exceptions
[ https://issues.apache.org/jira/browse/CAMEL-22195?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17985872#comment-17985872 ]
Claus Ibsen commented on CAMEL-22195:
-------------------------------------
https://github.com/resilience4j/resilience4j/discussions/2328
> camel-resilience4j - record exception should handle wrapped exceptions
> ----------------------------------------------------------------------
>
> Key: CAMEL-22195
> URL: https://issues.apache.org/jira/browse/CAMEL-22195
> Project: Camel
> Issue Type: Bug
> Affects Versions: 4.10.3
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Major
> Fix For: 4.8.9, 4.10.7, 4.13.0
>
>
> Exceptions that are thrown may be wrapped in CamelRuntimeException etc and resilienc4j should understand that.
> For example the following is not recorded as a failure
> {code:java}
> from("timer:trigger?period=1000&includeMetadata=true")
> .setBody().exchangeProperty("CamelTimerCounter")
> .log("Client request: ${body}")
> .circuitBreaker()
> .resilience4jConfiguration().recordException(java.io.IOException.class).end()
> .to("log:service1")
> .log("Client throw a fake IOException to trigger circuit breaker")
> .throwException(new java.io.IOException("Fake exception to trigger circuit breaker"))
> .onFallback()
> .to("log:fallback")
> .setBody().constant("fallback")
> .end()
> .log("Client response: ${body}"); {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)