All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.auth0.jwk.RateLimitReachedException Maven / Gradle / Ivy

There is a newer version: 0.22.1
Show newest version
package com.auth0.jwk;

@SuppressWarnings("WeakerAccess")
public class RateLimitReachedException extends JwkException {
    private final long availableInMs;

    public RateLimitReachedException(long availableInMs) {
        super(String.format("The Rate Limit has been reached! Please wait %d milliseconds.", availableInMs));
        this.availableInMs = availableInMs;
    }

    /**
     * Returns the delay in which the jwk request can be retried.
     *
     * @return the time to wait in milliseconds before retrying the request.
     */
    public long getAvailableIn() {
        return availableInMs;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy