Class RateLimitException

All Implemented Interfaces:
Serializable
Direct Known Subclasses:
QuotaExceededException

public class RateLimitException extends BetterStackException
The service rate-limited the call (HTTP 429); see BetterStackException.retryAfter().
See Also:
  • Constructor Details

    • RateLimitException

      public RateLimitException(String message)
      Creates the exception.
      Parameters:
      message - redacted human text
    • RateLimitException

      public RateLimitException(String message, Throwable cause)
      Creates the exception with a cause.
      Parameters:
      message - redacted human text
      cause - underlying error, may be null
    • RateLimitException

      public RateLimitException(String message, Integer httpStatus, String requestId, Duration retryAfter, Throwable cause)
      Creates the exception with response details.
      Parameters:
      message - redacted human text
      httpStatus - HTTP status, may be null
      requestId - vendor request id, may be null
      retryAfter - server-requested wait, may be null
      cause - underlying error, may be null
    • RateLimitException

      protected RateLimitException(String message, Integer httpStatus, String requestId, boolean retryable, Duration retryAfter, Throwable cause)
      Creates the exception with response details and an explicit retryable flag, for service subclasses whose errors differ from the default of the code (for example a CONFLICT that may succeed when retried, or an UNAVAILABLE that will not). The base exception's of factory with a retryable argument uses it too.
      Parameters:
      message - redacted human text
      httpStatus - HTTP status, may be null
      requestId - vendor request id, may be null
      retryable - whether retrying the same call may succeed
      retryAfter - server-requested wait, may be null
      cause - underlying error, may be null