diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index a464486..7c471e8 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -6,6 +6,8 @@ use Throwable; use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler; use WM\Core\Exceptions\ValidationErrorException; use WM\Core\Services\Responser; +use WM\WebBuilder\Exceptions\SiteBannedException; + class Handler extends ExceptionHandler { @@ -54,7 +56,10 @@ class Handler extends ExceptionHandler { if ($exception instanceof ValidationErrorException) { return response()->json(Responser::error($exception->getMessageBody(), $exception->getMessageInfo()), 422); + } elseif ($exception instanceof SiteBannedException) { + return response()->view('webBuilder::errors.template_disabled', ['error' => 'business banned']); } + return parent::render($request, $exception); } }