summaryrefslogtreecommitdiff
path: root/src/Router/Router.php
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/Router/Router.php
parentc135fcf9041c604b32827a1cb027010bca5915ab (diff)
keys and sync endpoint setup
Diffstat (limited to 'src/Router/Router.php')
-rw-r--r--src/Router/Router.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Router/Router.php b/src/Router/Router.php
index b167142..1739e7c 100644
--- a/src/Router/Router.php
+++ b/src/Router/Router.php
@@ -67,7 +67,11 @@ class Router
} catch (MethodNotAllowedException $exception) {
return new ErrorResponse(ErrorCode::FORBIDDEN, "403", Response::HTTP_FORBIDDEN);
} catch (\Exception $exception) {
- return new ErrorResponse(ErrorCode::UNKNOWN, "Unknown error occured", Response::HTTP_INTERNAL_SERVER_ERROR);
+ return new ErrorResponse(
+ ErrorCode::UNKNOWN,
+ $exception->getMessage() ?: "Unknown error occured",
+ Response::HTTP_INTERNAL_SERVER_ERROR
+ );
}
}