Class RateLimitError


  • public class RateLimitError
    extends java.lang.Object
    Error occurred because the app is being rate limited.
    • Field Detail

      • retryAfter

        protected final long retryAfter
    • Constructor Detail

      • RateLimitError

        public RateLimitError​(RateLimitReason reason,
                              long retryAfter)
        Error occurred because the app is being rate limited.
        Parameters:
        reason - The reason why the app is being rate limited. Must not be null.
        retryAfter - The number of seconds that the app should wait before making another request.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
      • RateLimitError

        public RateLimitError​(RateLimitReason reason)
        Error occurred because the app is being rate limited.

        The default values for unset fields will be used.

        Parameters:
        reason - The reason why the app is being rate limited. Must not be null.
        Throws:
        java.lang.IllegalArgumentException - If any argument does not meet its preconditions.
    • Method Detail

      • getReason

        public RateLimitReason getReason()
        The reason why the app is being rate limited.
        Returns:
        value for this field, never null.
      • getRetryAfter

        public long getRetryAfter()
        The number of seconds that the app should wait before making another request.
        Returns:
        value for this field, or null if not present. Defaults to 1L.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toStringMultiline

        public java.lang.String toStringMultiline()
        Returns a String representation of this object formatted for easier readability.

        The returned String may contain newlines.

        Returns:
        Formatted, multiline String representation of this object