Enum Class TooManyRequestsApiErrorCode

java.lang.Object
java.lang.Enum<TooManyRequestsApiErrorCode>
com.chargebee.v4.exceptions.codes.TooManyRequestsApiErrorCode
All Implemented Interfaces:
ApiErrorCode, Serializable, Comparable<TooManyRequestsApiErrorCode>, Constable

public enum TooManyRequestsApiErrorCode extends Enum<TooManyRequestsApiErrorCode> implements ApiErrorCode
API error codes for HTTP 429 responses
  • Enum Constant Details

    • THIRD_PARTY_API_REQUEST_LIMIT_EXCEEDED

      public static final TooManyRequestsApiErrorCode THIRD_PARTY_API_REQUEST_LIMIT_EXCEEDED
      API error code: third_party_api_request_limit_exceeded
    • API_REQUEST_LIMIT_EXCEEDED

      public static final TooManyRequestsApiErrorCode API_REQUEST_LIMIT_EXCEEDED
      API error code: api_request_limit_exceeded
    • LOCK_TIMEOUT

      public static final TooManyRequestsApiErrorCode LOCK_TIMEOUT
      API error code: lock_timeout
    • _UNKNOWN

      public static final TooManyRequestsApiErrorCode _UNKNOWN
      Represents an unknown or unrecognized error code. This allows forward compatibility when new error codes are added.
  • Method Details

    • values

      public static TooManyRequestsApiErrorCode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static TooManyRequestsApiErrorCode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getValue

      public String getValue()
      Get the string value of this error code as returned by the API.
      Specified by:
      getValue in interface ApiErrorCode
      Returns:
      the API string value, or null for _UNKNOWN
    • fromString

      public static TooManyRequestsApiErrorCode fromString(String value)
      Convert an API string value to the corresponding enum constant. Returns _UNKNOWN for unrecognized values to ensure forward compatibility.
      Parameters:
      value - the API string value
      Returns:
      the corresponding enum constant, or _UNKNOWN if not recognized
    • isKnown

      public boolean isKnown()
      Check if this error code is a known (non-unknown) value.
      Specified by:
      isKnown in interface ApiErrorCode
      Returns:
      true if this is a recognized error code