Browse Source

use exception status

Taylor Otwell 6 years ago
parent
commit
396634857e
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/Exceptions/Handler.php

+ 1 - 1
app/Exceptions/Handler.php

@@ -65,7 +65,7 @@ class Handler extends ExceptionHandler
         return response()->json([
             'message' => $exception->getMessage(),
             'errors' => $exception->errors(),
-        ], 422);
+        ], $exception->status);
     }
 
     /**