diff --git a/app/ExceptionHandle.php b/app/ExceptionHandle.php index 1c1f437..d1307ed 100644 --- a/app/ExceptionHandle.php +++ b/app/ExceptionHandle.php @@ -51,12 +51,12 @@ class ExceptionHandle extends Handle public function render($request, Throwable $e): Response { // 添加自定义异常处理机制 - if ($e instanceof ValidateException) { - return json(['code'=>400,'message'=>$e->getMessage()]); - } - if ($request->isJson()) { - return json(['code'=>400,'message'=>$e->getMessage()]); - } +// if ($e instanceof ValidateException) { +// return json(['code'=>400,'message'=>$e->getMessage()]); +// } +// if ($request->isJson()) { +// return json(['code'=>400,'message'=>$e->getMessage()]); +// } // 其他错误交给系统处理 return parent::render($request, $e);