Skip to content

Commit

Permalink
[6.x] Make ThrottleRequestsException extend TooManyRequestsHttpExcept…
Browse files Browse the repository at this point in the history
…ion (#30943)

* ThrottleRequestsException extends TooManyRequestsHttpException

* Fixed constructor doc

* Update PostTooLargeException.php

Co-authored-by: Taylor Otwell <taylor@laravel.com>
  • Loading branch information
GrahamCampbell and taylorotwell committed Dec 27, 2019
1 parent 0e81b36 commit a631793
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Illuminate/Http/Exceptions/PostTooLargeException.php
Expand Up @@ -8,7 +8,7 @@
class PostTooLargeException extends HttpException
{
/**
* PostTooLargeException constructor.
* Create a new "post too large" exception instance.
*
* @param string|null $message
* @param \Exception|null $previous
Expand Down
8 changes: 4 additions & 4 deletions src/Illuminate/Http/Exceptions/ThrottleRequestsException.php
Expand Up @@ -3,12 +3,12 @@
namespace Illuminate\Http\Exceptions;

use Exception;
use Symfony\Component\HttpKernel\Exception\HttpException;
use Symfony\Component\HttpKernel\Exception\TooManyRequestsHttpException;

class ThrottleRequestsException extends HttpException
class ThrottleRequestsException extends TooManyRequestsHttpException
{
/**
* Create a new exception instance.
* Create a new throttle requests exception instance.
*
* @param string|null $message
* @param \Exception|null $previous
Expand All @@ -18,6 +18,6 @@ class ThrottleRequestsException extends HttpException
*/
public function __construct($message = null, Exception $previous = null, array $headers = [], $code = 0)
{
parent::__construct(429, $message, $previous, $headers, $code);
parent::__construct(null, $message, $previous, $code, $headers);
}
}

0 comments on commit a631793

Please sign in to comment.