Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Make ThrottleRequestsException extend TooManyRequestsHttpException #30943

Merged
merged 3 commits into from Dec 27, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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);
}
}