# Error Boundaries

> A design pattern that catches failures at a component boundary, so a failing part renders or returns an error while the rest keeps running.

Record: `architecture:error-boundaries`
Kind: pattern
Layer: [Correctness Core](https://banes-lab.com/records/layer/correctness-core.md)
Severity: recommended
Scope: component, UI, service boundary
Canonical: https://banes-lab.com/ontology#architecture-error-boundaries

Listed in [Architecture principles](https://banes-lab.com/api/records/architecture.md), after [Error Handling](https://banes-lab.com/records/architecture/error-handling.md) and before [Fallback Pattern](https://banes-lab.com/records/architecture/fallback-pattern.md).

## Repair

- Refactored by: Add Boundary Handler, Isolate Component
- Detected by: uncaught exceptions crossing boundary
- Violated by: uncontained failures crashing whole system
- Measured by: blast radius
- Enforced by: failure tests

## Requires

- [Failure Isolation](https://banes-lab.com/records/lexicon/failure-isolation.md)

## Reinforces

- [Resilience](https://banes-lab.com/records/architecture/resilience.md)

## Enables

- [Localized Recovery](https://banes-lab.com/records/lexicon/localized-recovery.md)

## Conflicts with

- [Failure Propagation](https://banes-lab.com/records/lexicon/failure-propagation.md)

## In tension with

- [Hidden Errors](https://banes-lab.com/records/lexicon/hidden-errors.md)

## Tensions

- [Error Boundaries / Hidden Errors](https://banes-lab.com/records/tension/error-boundaries-hidden-errors.md)

## Severity

- [recommended](https://banes-lab.com/records/vocabulary/severity-recommended.md)

## Category

- [Error Handling / Resilience](https://banes-lab.com/records/architecture-category/error-handling-resilience.md)

## Linked from

- [Error Handling / Resilience](https://banes-lab.com/ontology/principles/architecture-category-error-handling-resilience.md)
- [Error Handling / Resilience](https://banes-lab.com/ontology/lexicon/lexicon-category-error-handling-resilience.md)
- [Severity levels](https://banes-lab.com/ontology/schema/the-vocabulary-severity.md)
- [The resolutions](https://banes-lab.com/ontology/schema/the-resolutions.md)
