BotNetwork

Error handling patterns for chat bots

Users need a calm message. Operators need a stack trace. Do not confuse the two.

Guide1 min readUpdated

Classes of failure

Class Example User sees System does
Validation Bad argument How to fix the command No retry
Rate limit HTTP 429 "Busy, try soon" or silent queue Backoff with Retry-After
Upstream Platform 502 Soft apology Retry limited times
Bug TypeError Generic sorry Alert + no retry

Never

  • Retry non-idempotent payments without a key
  • Reply with raw exception strings
  • Swallow signature verification failures

Tools

Related comparisons and tools