Skip to slide
Chapter 13 · Reliability: Retries, Idempotency, and Failure Handling
125 / 191

CHAPTER 13 · Reliability: Retries, Idempotency, and Failure Handling · 6 / 12

Graceful degradation

Not every failure should fail the request. Decide, per dependency, whether its failure is fatal or degradable:

  • Optional enhancement fails → degrade. If a document's preview rendering fails, keep the document usable for text and reading; don't reject the upload.
  • Core dependency fails → fail clearly. If the model API is down, there's no answer to give; return an honest error.
  • External enrichment fails → continue without it. If a research API is unavailable, answer from what you have and say what's missing, rather than crashing the turn.

Map each dependency to "fatal" or "degradable" deliberately, and wrap accordingly.

← → arrow keys work too