summaryrefslogtreecommitdiff
path: root/src/Errors
diff options
context:
space:
mode:
authorDaniel Weipert <git@mail.dweipert.de>2025-08-15 15:47:27 +0200
committerDaniel Weipert <git@mail.dweipert.de>2025-08-15 15:47:27 +0200
commita0ad1f5e7fac279b33ea09ca0e347cd7d02cd8ec (patch)
tree15363be13084bd61b386cf817212096089ea508f /src/Errors
parentc135fcf9041c604b32827a1cb027010bca5915ab (diff)
keys and sync endpoint setup
Diffstat (limited to 'src/Errors')
-rwxr-xr-xsrc/Errors/UnauthorizedError.php18
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 [];
+ }
+}