Lv.1 0 XP

Recovery Patterns — Retry, Fallback, Graceful Degradation

Core 7 min +30 XP
💡
THE ANALOGY

A GPS rerouting when a road is closed. It doesn't repeat the blocked route. It doesn't pretend the road is open. It acknowledges the closure, finds an alternative, and continues. Error recovery in agentic systems works the same way — acknowledge, adapt, continue.

⚠️ EXAM TRAP — The Wrong Answer People Choose

Using the same recovery strategy for all error types. Transient errors get retried. Permission errors need authorization changes — retrying is pointless. Business rule violations need alternative actions, not retries.

KEY POINTS
1 Retry with exponential backoff for transient errors only — network timeouts, rate limits, temporary unavailability.
2 Circuit breaker pattern: after N consecutive failures, stop trying and fail fast — prevents cascading failures.
3 Fallback: alternative data source or reduced-quality result when primary fails — only for transient failures.
4 Graceful degradation: return partial results clearly labeled as incomplete rather than failing entirely.
5 Never use fallback or retry for permission errors or validation errors — fix the root cause instead.