## Lesson — Using domain-specific error subclasses instead of raw Error

**Tags:** architecture, errors, cli

Using domain-specific error subclasses instead of raw Error throws allows CLI handlers to provide actionable recovery hints while suppressing noisy stack traces for known failure modes. This pattern improves user experience by focusing on the solution rather than the system internals during standard execution.
