We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ee62ca4 commit 2db4345Copy full SHA for 2db4345
Controllers/HomeController.php
@@ -22,12 +22,15 @@ public function error(): IActionResult
22
$code = $this->HttpContext->Error ? $this->HttpContext->Error->getCode() : 404;
23
24
switch ($code) {
25
- case 404:
26
- $error = new \Exception("Sorry! Looks like this page doesn't exist.", 404);
+ case 401:
+ return $this->redirect('/account/login');
27
break;
28
case 403:
29
$error = new \Exception("Sorry! Your request is not allowed.", 403);
30
31
+ case 404:
32
+ $error = new \Exception("Sorry! Looks like this page doesn't exist.", 404);
33
+ break;
34
default:
35
$error = new \Exception("Woops! Looks like something went wrong.", 500);
36
0 commit comments