Examples
Error Boundaries
Resilient API dashboard with circuit breakers, retry strategies, and performance metrics.
Try it
Loading example…
Use the fail-rate sliders to inject errors. Watch circuit breakers open after 3 failures and auto-recover. Switch recovery strategies to see retry-later backoff in action.
How it works
Three simulated API services with configurable failure rates demonstrate Directive’s error handling primitives.
- Circuit Breakers – Each service has its own circuit breaker. After 3 consecutive failures the circuit opens, blocking requests. After a recovery timeout it enters half-open to test recovery.
- Recovery Strategies – Choose between
skip(swallow errors),retry-later(exponential backoff), orthrowto see how the system responds. - Performance Metrics – Average latency, error rates, and request counts update in real-time.
Source code
main.ts
// Source file "main.ts" not found

