"""Domain errors. The API layer maps these to HTTP status codes so services stay transport-agnostic.""" class DomainError(Exception): """Base for domain-level errors.""" class NotFound(DomainError): """Requested entity does not exist (or is soft-deleted / not visible).""" class Forbidden(DomainError): """Caller lacks the required role for this action.""" class Conflict(DomainError): """Operation conflicts with current state (e.g. duplicate email)."""