From 1034dd30f93e3e2bdba7d1cfc81e78eaaacf4092 Mon Sep 17 00:00:00 2001 From: Johannes Kantz <67144859+JohannesKantz@users.noreply.github.com> Date: Sat, 21 Jan 2023 13:25:49 +0100 Subject: [PATCH] add: json error message --- Router/Router.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Router/Router.php b/Router/Router.php index 35d05fc..6e5b7a3 100644 --- a/Router/Router.php +++ b/Router/Router.php @@ -235,7 +235,7 @@ class Router if ($controller) { $controller($this->request, $this->response); } else { - echo "404"; + $this->response->json(["status" => "404", "message" => "Not found"], 404); } } } \ No newline at end of file