class RateLimitExceededException extends Exception

A RateLimitExceededException is thrown when there have been too many requests.

The usual RateLimit on the Content Delivery API is 216000 requests/hour and 78 requests/second. Responses cached by the Contentful CDN don't count against the rate limit.

Methods

__construct(RequestException $previous, string $message = '')

RateLimitExceededException constructor.

serialize()

No description

from Exception
unserialize($serialized)

No description

from Exception
RequestInterface
getRequest()

Get the request that caused the exception.

from Exception
ResponseInterface|null
getResponse()

Get the associated response.

from Exception
bool
hasResponse()

Check if a response was received.

from Exception
string|null
getRequestId()

No description

from Exception
int|null
getRateLimitReset()

Returns the number of seconds until the rate limit expires.

Details

at line 34
__construct(RequestException $previous, string $message = '')

RateLimitExceededException constructor.

Parameters

RequestException $previous
string $message

in Exception at line 64
serialize()

in Exception at line 77
unserialize($serialized)

Parameters

$serialized

in Exception at line 113
RequestInterface getRequest()

Get the request that caused the exception.

Return Value

RequestInterface

in Exception at line 123
ResponseInterface|null getResponse()

Get the associated response.

Return Value

ResponseInterface|null

in Exception at line 133
bool hasResponse()

Check if a response was received.

Return Value

bool

in Exception at line 141
string|null getRequestId()

Return Value

string|null

at line 48
int|null getRateLimitReset()

Returns the number of seconds until the rate limit expires.

Return Value

int|null