[
https://issues.apache.org/jira/browse/CAMEL-22195?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Claus Ibsen resolved CAMEL-22195.
---------------------------------
Resolution: Fixed
> 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)