RateLimitException
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.
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.
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.
DateTimeImmutable
resetsAt()
Time when rate limit bucket is refilled.