Exceptions
Table of Contents
Classes
- InsufficientStockException
- Thrown by {@see \App\UI\Api\Store\Models\Services\DocumentService} when an issue / transfer /
receipt-storno cannot be covered by available stock (available = quantity - reserved) and
negativeStockAllowed is off. Aborts (rolls back) the whole operation transaction.
- ReservationShortfallException
- Thrown inside the reserve() transaction when allowPartial=false and the waterfall could not cover
every requested unit. Throwing (rather than returning) is deliberate: it rolls the whole
transaction back so the partial reserved increments already applied are undone — nothing is
reserved on a strict shortfall. {@see \App\UI\Api\Store\Models\Services\ReservationService}
catches it and turns it into a ReservationResult::error('insufficientStock') carrying the
uncovered breakdown.