diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 1d6676407a22..f2d53abf67c1 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -222,7 +222,7 @@ class Handler extends ExceptionHandler return response()->json(['message'=>'Too many requests'], 429); // } elseif ($exception instanceof FatalThrowableError && $request->expectsJson()) { // return response()->json(['message'=>'Fatal error'], 500); //@deprecated - } elseif ($exception instanceof AuthorizationException) { + } elseif ($exception instanceof AuthorizationException && $request->expectsJson()) { return response()->json(['message'=> $exception->getMessage()], 401); } elseif ($exception instanceof TokenMismatchException) { return redirect() diff --git a/app/Http/Controllers/ClientPortal/SubscriptionPlanSwitchController.php b/app/Http/Controllers/ClientPortal/SubscriptionPlanSwitchController.php index 3390512616d7..6fd26bbba7ac 100644 --- a/app/Http/Controllers/ClientPortal/SubscriptionPlanSwitchController.php +++ b/app/Http/Controllers/ClientPortal/SubscriptionPlanSwitchController.php @@ -55,4 +55,9 @@ class SubscriptionPlanSwitchController extends Controller ]); } + + public function not_availabe() + { + abort(404, 'ewwo'); + } } diff --git a/app/Http/Requests/ClientPortal/Subscriptions/ShowPlanSwitchRequest.php b/app/Http/Requests/ClientPortal/Subscriptions/ShowPlanSwitchRequest.php index a3fe7e8fb2a3..1a906018d87d 100644 --- a/app/Http/Requests/ClientPortal/Subscriptions/ShowPlanSwitchRequest.php +++ b/app/Http/Requests/ClientPortal/Subscriptions/ShowPlanSwitchRequest.php @@ -1,14 +1,21 @@ entity->client; } - return false; + return null; } public function failed($exception = null) diff --git a/resources/views/errors/guest.blade.php b/resources/views/errors/guest.blade.php index 9df84c302c60..0b2500ba8319 100644 --- a/resources/views/errors/guest.blade.php +++ b/resources/views/errors/guest.blade.php @@ -1,5 +1,5 @@ @extends('portal.ninja2020.layout.error') -@section('title', __('Server Error')) -@section('code', '500') +@section('title', __($title) ?: 'Server Error') +@section('code', __($code) ?: '500') @section('message', __($message) ?: 'System Error') diff --git a/resources/views/errors/illustrated-layout.blade.php b/resources/views/errors/illustrated-layout.blade.php index 3f81c6cae145..0c6eb3f08731 100644 --- a/resources/views/errors/illustrated-layout.blade.php +++ b/resources/views/errors/illustrated-layout.blade.php @@ -481,11 +481,10 @@ @yield('message')

- - + + {{ ctrans('texts.back_to', ['url' => parse_url(request()->getHttpHost())['host'] ?? request()->getHttpHost()]) }} +