Module de.seggebaeing.sqlanalyzer
Class RateLimitException
java.lang.Object
java.lang.Throwable
java.lang.Exception
de.seggebaeing.sqlanalyzer.logic.promptable.exception.LLMException
de.seggebaeing.sqlanalyzer.logic.promptable.exception.RateLimitException
- All Implemented Interfaces:
Serializable
Exception indicating that an LLM call exceeded its rate limit.
Contains information about when the next retry is allowed.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructs a RateLimitException with the default retry delay.RateLimitException
(long retryAfter) Constructs a RateLimitException with a custom retry delay. -
Method Summary
Modifier and TypeMethodDescriptionReturns the point in time when a new request may be safely attempted.Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
Constructor Details
-
RateLimitException
public RateLimitException()Constructs a RateLimitException with the default retry delay. -
RateLimitException
public RateLimitException(long retryAfter) Constructs a RateLimitException with a custom retry delay.- Parameters:
retryAfter
- the number of seconds after which the request may be retried
-
-
Method Details
-
getRetryInstant
Returns the point in time when a new request may be safely attempted.- Returns:
- an
Instant
after which the client can retry the request
-