Tokumeikoi 5 years ago
parent
commit
d9dcea4e4f
1 changed files with 2 additions and 2 deletions
  1. 2 2
      app/Exceptions/Handler.php

+ 2 - 2
app/Exceptions/Handler.php

@@ -46,8 +46,8 @@ class Handler extends ExceptionHandler
      */
     public function render($request, Exception $exception)
     {
-        if($exception instanceof ThrottleRequestsException) {
-            abort(500, '请求频繁,请稍后再试');
+        if($exception instanceof \Illuminate\Http\Exceptions\ThrottleRequestsException) {
+            abort(429, '请求频繁,请稍后再试');
         }
         return parent::render($request, $exception);
     }