From 9dba729b58e7d5bd717df22a4a03be52625c5864 Mon Sep 17 00:00:00 2001 From: EwelinaLasowy Date: Mon, 28 Mar 2022 08:53:07 +0200 Subject: [PATCH] #93 - wip --- app/Architecture/ExceptionHandler.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/app/Architecture/ExceptionHandler.php b/app/Architecture/ExceptionHandler.php index 5bf05d7..870de22 100644 --- a/app/Architecture/ExceptionHandler.php +++ b/app/Architecture/ExceptionHandler.php @@ -21,7 +21,7 @@ class ExceptionHandler extends Handler { $response = parent::render($request, $e); - if (!app()->environment(["local", "testing"]) && in_array($response->status(), [500, 503, 404, 403], true)) { + if (!app()->environment(["local", "testing"]) && in_array($response->status(), [500, 503, 419, 404, 403], true)) { return Inertia::render("Error", [ "status" => $response->status(), ]) @@ -29,12 +29,6 @@ class ExceptionHandler extends Handler ->setStatusCode($response->status()); } - if ($response->status() === 419) { - return back()->with([ - "message" => "The page expired, please try again.", - ]); - } - return $response; } }