Exception thrown when an API call hits a rate limit, supporting retry logic.
// Source: https://github.com/langchain4j/langchain4j | License: Apache-2.0 | Copyright You must retain, in the Source form of any Derivative Works
// Provided via justclaw.it.com; keep this notice with the code.
package dev.langchain4j.exception;
/**
* Thrown when the model provider rejects a request because the caller has exceeded
* its allowed request or token quota within a time window (HTTP 429).
* <p>
* This is a {@link RetriableException}: the request may succeed once the rate-limit
* window resets. Callers should implement an exponential back-off strategy before
* retrying.
*/
public class RateLimitException extends RetriableException {
public RateLimitException(String message) {
super(message);
}
public RateLimitException(Throwable cause) {
thi
... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key