This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-jbang-examples.git


The following commit(s) were added to refs/heads/main by this push:
     new 10cca78  Update example
10cca78 is described below

commit 10cca7830bbc6007fa6e4a7be0d5ead3cf605a8c
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed May 27 17:00:30 2026 +0200

    Update example
---
 circuit-breaker/README.md        | 21 +++++++++++++++++++++
 circuit-breaker/route.camel.yaml | 15 +++++++++++++++
 2 files changed, 36 insertions(+)

diff --git a/circuit-breaker/README.md b/circuit-breaker/README.md
index 7834259..2cf9f71 100644
--- a/circuit-breaker/README.md
+++ b/circuit-breaker/README.md
@@ -43,7 +43,28 @@ how the state of the circuit breaker changes from closed to 
open due to many fai
 $ camel get circuit-breaker --watch
 ```
 
+### Inspecting errors
 
+Because the circuit breaker triggers exceptions, you can use `camel get error` 
to inspect
+captured routing errors:
+
+```sh
+$ camel get error
+```
+
+This shows a summary table with PID, route, node, exchange ID, exception type 
and message.
+
+To see full details of the last error (body, headers, variables, properties, 
exception and message history):
+
+```sh
+$ camel get error --last
+```
+
+You can also pick a specific error by its exchange ID:
+
+```sh
+$ camel get error --id=<exchangeId> --detail
+```
 
 ### Help and contributions
 
diff --git a/circuit-breaker/route.camel.yaml b/circuit-breaker/route.camel.yaml
index 8ae2355..7370c90 100644
--- a/circuit-breaker/route.camel.yaml
+++ b/circuit-breaker/route.camel.yaml
@@ -9,6 +9,21 @@
             expression:
               constant:
                 expression: Hello Camel
+        - setVariable:
+            name: myCounter
+            expression:
+              simple:
+                expression: "${random(100)}"
+        - setProperty:
+            name: myRegion
+            expression:
+              constant:
+                expression: us-east-1
+        - setHeader:
+            name: myTraceId
+            expression:
+              simple:
+                expression: "trace-${exchangeId}"
         - circuitBreaker:
             resilience4jConfiguration:
               minimumNumberOfCalls: 10

Reply via email to