diff options
Diffstat (limited to 'src/Errors')
-rwxr-xr-x | src/Errors/UnauthorizedError.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Errors/UnauthorizedError.php b/src/Errors/UnauthorizedError.php new file mode 100755 index 0000000..97df025 --- /dev/null +++ b/src/Errors/UnauthorizedError.php @@ -0,0 +1,18 @@ +<?php + +namespace App\Errors; + +use Symfony\Component\HttpFoundation\Response; + +class UnauthorizedError extends Exception +{ + public function __construct() + { + parent::__construct(ErrorCode::FORBIDDEN, "Unauthorized", Response::HTTP_UNAUTHORIZED); + } + + public function getAdditionalData(): array + { + return []; + } +} |