dodil/erp-brick-consolidation

DODIL ERP brick: consolidation

src/brick_consolidation/domain/errors.py

"""The one refusal a rule makes. The use cases turn it into a 409 with these words, through both doors."""


class RuleBroken(Exception):
    """A business rule said no. The message is written for the person who tried."""


class Invalid(RuleBroken):
    """An input outside its bounds (a percentage above 100, an amount that does not fit NUMERIC(18,2)): a 422, never a 500."""