public class RateLimitException extends RiotApiException
getRateLimitType().BAD_GATEWAY, BAD_REQUEST, DATA_NOT_FOUND, FORBIDDEN, GATEWAY_TIMEOUT, IOEXCEPTION, METHOD_NOT_ALLOWED, MISSING_API_KEY, MISSING_TOURNAMENT_API_KEY, NOT_IMPLEMENTED, NULLPOINTEREXCEPTION, PARSE_FAILURE, RATE_LIMITED, SERVER_ERROR, TIMEOUT_EXCEPTION, UNAUTHORIZED, UNAVAILABLE, UNPROCESSABLE_ENTITY, UNSUPPORTED_MEDIA_TYPE| Constructor and Description |
|---|
RateLimitException(int retryAfter,
java.lang.String rateLimitType)
Constructs a
RateLimitException with the specified attributes. |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getRateLimitType()
Returns the type of rate limit that has been exceeded.
|
int |
getRetryAfter()
Returns the time in seconds to wait before the api key limits get refreshed.
|
getErrorCode, getErrorDto, getMessage, getMessagepublic RateLimitException(int retryAfter,
java.lang.String rateLimitType)
RateLimitException with the specified attributes.retryAfter - The time in seconds to wait before the api key limits get refreshedrateLimitType - The type of rate limit that has been exceededpublic java.lang.String getRateLimitType()
user, if the user's api key has reached its
limits, or service, if Riot has reached some internal limits for that api.public int getRetryAfter()