final class RateLimitException extends FossabotApiException (View source)

Exception thrown when making a Fossabot API call, and it results in a rate limit throttled response (429).

Methods

__construct(string $fossabotCode, string $errorClass, string $errorMessage, int $total, int $remaining, int $resetsAt, array|null $body = null, Throwable|null $previous = null)

Constructs a new RateLimitException class.

string
fossabotCode()

Error code from Fossabot API response.

string
errorClass()

Error class (error param) from Fossabot API response.

string
errorMessage()

Error message from Fossabot API response.

int
statusCode()

HTTP status code from Fossabot API exception.

array|null
body()

Parsed HTTP body from Fossabot API exception.

__toString()

{@inheritDoc}

int
total()

Total size of rate limit bucket.

int
remaining()

Remaining request in bucket.

resetsAt()

Time when rate limit bucket is refilled.

Details

__construct(string $fossabotCode, string $errorClass, string $errorMessage, int $total, int $remaining, int $resetsAt, array|null $body = null, Throwable|null $previous = null)

Constructs a new RateLimitException class.

Parameters

string $fossabotCode

Error code from Fossabot API response

string $errorClass

Error class (error param) from Fossabot API response

string $errorMessage

Error message from Fossabot API response

int $total

Total size of rate limit bucket

int $remaining

Remaining request in bucket

int $resetsAt

Time when rate limit bucket is refilled

array|null $body

Parsed HTTP body from Fossabot API exception

Throwable|null $previous

Previous exception

string fossabotCode()

Error code from Fossabot API response.

Return Value

string

Fossabot error code

string errorClass()

Error class (error param) from Fossabot API response.

Return Value

string

Error class

string errorMessage()

Error message from Fossabot API response.

Return Value

string

Error message

int statusCode()

HTTP status code from Fossabot API exception.

Return Value

int

HTTP status code

array|null body()

Parsed HTTP body from Fossabot API exception.

Return Value

array|null

HTTP body

__toString()

{@inheritDoc}

int total()

Total size of rate limit bucket.

Return Value

int

int remaining()

Remaining request in bucket.

Return Value

int

DateTimeImmutable resetsAt()

Time when rate limit bucket is refilled.

Return Value

DateTimeImmutable