A circuit breaker prevents repeated calls to an unhealthy dependency, such as an internal service or third-party API. An outbound proxy monitors the dependency and returns a useful error when it times out, stops responding, or behaves unexpectedly, limiting cascading failures. section 5.7
Third-party API failure
Suppose an application depends on a third-party API that becomes unavailable or returns malformed data. Without protection, errors can reach application servers or cause corrupted database writes. A circuit breaker stops sending calls after unhealthy responses and returns a controlled result, while graceful degradation keeps the application operating where possible. section 5.7
Pair the circuit breaker with defensive handling of consumed API data:
- Validate and sanitize external responses at runtime; reject invalid data and contact the API provider. section 5.7
- Build validation models from documented OpenAPI response schemas and parameterize database queries involving external data. section 5.7





