AI Engineering Judgment/AI UX & Product Design
Intermediate9 min

Error States for AI

AI features fail in ways traditional software does not — rate limits, hallucinations, timeouts, tool failures, and model outages. Learn to design error boundaries, fallback strategies, and user-facing error messages that keep users productive even when the AI breaks.

Quick Reference

  • AI error states need to be specific — 'Something went wrong' is never acceptable
  • Rate limits: show a countdown timer and queue the request, do not just show an error
  • Hallucination: design for it with 'I am not confident' states and feedback buttons
  • Model outage: fall back to a simpler model or cached response, not a blank page
  • Timeout: show partial results if available, offer to retry or use a different approach
  • Every error state must offer at least one action: retry, rephrase, fallback, or contact support

AI Error Taxonomy

AI features have a broader error taxonomy than traditional software. Beyond the usual HTTP errors and exceptions, you need to handle model-specific failures (rate limits, token limits, safety filters), quality failures (hallucinations, irrelevant responses), and infrastructure failures (model outages, embedding service down).

Error CategoryExamplesUser ImpactRecovery Strategy
Rate limiting429 from OpenAI/Anthropic, quota exhaustionRequest rejectedQueue and retry with backoff, show countdown
Token limit exceededInput too long for context windowCannot processSummarize input, split into chunks, use larger model
Safety filterContent flagged by model's safety systemResponse blockedExplain why, suggest rephrasing, offer human help
HallucinationConfident but wrong responseUser misledConfidence indicators, source citations, feedback buttons
Tool failureExternal API the agent depends on is downPartial functionalitySkip failed tool, use cached data, inform user of limitation
Model outageProvider API is completely downFeature unavailableFallback to simpler model, cached responses, or manual path
TimeoutLLM takes too long to respondUser gives upShow partial results, offer retry, suggest simpler query
Generic Errors Kill Trust

The fastest way to lose user trust is a generic 'Something went wrong' error when the AI fails. Users need to understand what happened and what they can do about it. Every AI error should be specific, actionable, and honest about the limitation.