Class StreamRateLimitException

All Implemented Interfaces:
Serializable

public class StreamRateLimitException extends StreamApiException
Thrown when the Stream API returns HTTP 429. Subclass of StreamApiException that additionally carries the parsed Retry-After header (RFC 7231 §7.1.3 — integer seconds or HTTP-date).
See Also:
  • Constructor Details

    • StreamRateLimitException

      public StreamRateLimitException(String message, int statusCode, int code, @Nullable Map<String,String> exceptionFields, boolean unrecoverable, String rawResponseBody, @Nullable String moreInfo, @Nullable Object details, @Nullable Duration retryAfter, @Nullable Throwable cause)
  • Method Details

    • getRetryAfter

      @Nullable public Duration getRetryAfter()
      Returns the Retry-After delta if the server sent a parseable value. null when the header was absent or unparseable.