diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index ee4413b..b614487 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -61,7 +61,7 @@ class Handler extends ExceptionHandler } elseif ($exception instanceof HasRelationException) { return response()->json(Responser::error([$exception->getMessage()]), 422); } elseif ($this->isHttpException($exception)) { - if ($exception->getStatusCode() == 404) { + if ($exception->getStatusCode() == 404 and in_array("web",$request->route()->middleware())) { return response()->view('webBuilder::errors.404', [], 404); } }