add domain exception classes

BadRequestException, UnauthorizedException, ForbiddenException -
all extend DomainException. use cases throw these to signal HTTP
4xx categories; controllers translate to JsonResponse status
codes (400, 401, 403).
This commit is contained in:
yisroel 2026-05-06 14:51:41 +03:00
parent c2ba02cc6f
commit fb5f8d4f02
3 changed files with 21 additions and 0 deletions

View file

@ -0,0 +1,7 @@
<?php
namespace App\Exceptions;
use DomainException;
class BadRequestException extends DomainException {}

View file

@ -0,0 +1,7 @@
<?php
namespace App\Exceptions;
use DomainException;
class ForbiddenException extends DomainException {}

View file

@ -0,0 +1,7 @@
<?php
namespace App\Exceptions;
use DomainException;
class UnauthorizedException extends DomainException {}