From f2d31d36767e8f5d5617c460aff10093fcd6a381 Mon Sep 17 00:00:00 2001 From: Thiritin Date: Sat, 3 Feb 2024 23:36:34 +0100 Subject: [PATCH] whitelist error codes --- app/Exceptions/Handler.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index cb123f32..2b74f5b2 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -66,6 +66,11 @@ public function render( return $response; } + + if (!in_array($status, [401, 402, 403, 404, 405, 500, 503])) { + return $response; + } + return inertia('Auth/Error', [ 'title' => "Error $status", 'description' => $response->exception?->getMessage(),