0Pricing
Claude Architect · Lesson

Anti-Pattern: Generic Error Messages

Why 'Operation failed' prevents recovery decisions.

The Failure That Tells You Nothing

A tool in your agentic loop returns:

{ "status": "error", "message": "Operation failed" }

The model now has to decide: retry, try a different query, escalate to a human, or stop. But "Operation failed" carries zero signal. It cannot tell whether the database was briefly down, the input was malformed, or a business rule blocked the action.

This is the generic error anti-pattern — and it quietly breaks agent reliability.

Why the Model Can't Recover

In the agentic loop, the model inspects each tool result and chooses the next action. A recovery decision depends on what kind of failure occurred:

  • Transient outage → retry locally
  • Bad input → fix the query and re-call
  • Business rule violation → do NOT retry; escalate or stop
  • Permission denied → escalate

A generic message collapses all four into one indistinguishable blob. The model is left to guess — often retrying something that will never succeed, or aborting the whole workflow on a fault it could have recovered from.

All lessons in this course

  1. The isError Flag
  2. Error Categories
  3. Retryable Metadata & Partial Results
  4. Anti-Pattern: Generic Error Messages
← Back to Claude Architect