diff --git a/src/RoutingContext.php b/src/RoutingContext.php index 27342aa..7ec5c07 100644 --- a/src/RoutingContext.php +++ b/src/RoutingContext.php @@ -22,9 +22,9 @@ class RoutingContext { } public function registerDefaultErrorPages(): void { - $this->router->addErrorHandler(401, fn($resp) => $resp->setContent($this->templating->rendering('errors/401'))); - $this->router->addErrorHandler(403, fn($resp) => $resp->setContent($this->templating->rendering('errors/403'))); - $this->router->addErrorHandler(404, fn($resp) => $resp->setContent($this->templating->rendering('errors/404'))); + $this->router->addErrorHandler(401, fn($resp) => $resp->setContent($this->templating->render('errors/401'))); + $this->router->addErrorHandler(403, fn($resp) => $resp->setContent($this->templating->render('errors/403'))); + $this->router->addErrorHandler(404, fn($resp) => $resp->setContent($this->templating->render('errors/404'))); $this->router->addErrorHandler(500, fn($resp) => $resp->setContent(file_get_contents(HAU_DIR_TEMPLATES . '/errors/500.html'))); $this->router->addErrorHandler(503, fn($resp) => $resp->setContent(file_get_contents(HAU_DIR_TEMPLATES . '/errors/503.html'))); }