A refusal a person caused and can act on. Thrown anywhere inside a unit of work — a handler, a model's observer, a
service the handler calls —, it rolls the unit back and answers with its text: a 422 for an action, the refusal as the
outcome of a command or a job. Nobody has to catch it; a handler that does keeps working.
final class CreditExceededException extends RuntimeException implements BusinessRefusalInterface
{
public function refusal(): MessageText
{
return MessageText::of('messages.credit.exceeded', [$this->limit])->from(SalesApp::NAMESPACE);
}
}