dodil/erp-brick-hr
src/brick_hr/domain/errors.py
"""How a rule says no. The application turns these into Refused: RuleBroken → 409, Incomplete → 422."""
class RuleBroken(Exception):
"""A domain rule refused the change, in the rule's own words. → 409."""
class Incomplete(RuleBroken):
"""Something has to be supplied first, or a value is not valid. → 422."""
class NotFound(Exception):
"""The thing asked for does not exist (or, decided in the application, is not visible). → 404."""