|
@@ -3,16 +3,16 @@
|
|
|
namespace App\Exceptions;
|
|
|
|
|
|
use Exception;
|
|
|
+use Throwable;
|
|
|
+use Illuminate\Support\Facades\Log;
|
|
|
use Illuminate\Auth\AuthenticationException;
|
|
|
-use Illuminate\Database\Eloquent\ModelNotFoundException;
|
|
|
-use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
|
|
use Illuminate\Session\TokenMismatchException;
|
|
|
-use Illuminate\Support\Facades\Log;
|
|
|
use Illuminate\Validation\ValidationException;
|
|
|
use Symfony\Component\HttpFoundation\Response;
|
|
|
+use Illuminate\Database\Eloquent\ModelNotFoundException;
|
|
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
|
|
+use Illuminate\Foundation\Exceptions\Handler as ExceptionHandler;
|
|
|
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
|
|
-use Throwable;
|
|
|
|
|
|
class Handler extends ExceptionHandler
|
|
|
{
|
|
@@ -96,7 +96,7 @@ class Handler extends ExceptionHandler
|
|
|
|
|
|
// 验证异常
|
|
|
$this->renderable(function (ValidationException $e) {
|
|
|
- return $this->formatJsonResponse(422, $e->validator->errors()->first(), Response::HTTP_UNPROCESSABLE_ENTITY);
|
|
|
+ return $this->formatJsonResponse(200, $e->validator->errors()->first(), Response::HTTP_UNPROCESSABLE_ENTITY);
|
|
|
});
|
|
|
|
|
|
// HTTP异常
|