#93 - fix to error page

This commit is contained in:
EwelinaLasowy
2022-03-28 10:51:20 +02:00
parent d1ad761ad1
commit f33e10d2c0
3 changed files with 7 additions and 80 deletions

View File

@@ -21,7 +21,7 @@ class ExceptionHandler extends Handler
{
$response = parent::render($request, $e);
if (!app()->environment(["local", "testing"]) && in_array($response->status(), [500, 503, 419, 404, 403], true)) {
if (!app()->environment(["local", "testing"]) && in_array($response->status(), [500, 503, 429, 419, 404, 403, 401], true)) {
return Inertia::render("Error", [
"status" => $response->status(),
])
@@ -29,8 +29,6 @@ class ExceptionHandler extends Handler
->setStatusCode($response->status());
}
return Inertia::render("DefaultError")
->toResponse($request)
->setStatusCode($response->status());
return $response;
}
}