Package net.ygbstudio.jbrave.core.model
Enum Class BraveErrorCode
- All Implemented Interfaces:
Serializable,Comparable<BraveErrorCode>,Constable
Enumeration of Brave API error codes.
This enum represents the different error codes that the Brave API can return.
- Author:
- Yoham Gabriel @ YGB Studio
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn internal server error.The request contained an invalid URL parameter.The requested option is not included in the current subscription plan.The request quota for the current period has been exhausted.The request was rate-limited; the client should honor theX-RateLimit-Resetwindow.The requested resource is not allowed under the current subscription plan.The subscription token does not match any active subscription.The provided subscription token is not valid.The usage limit for the current subscription has been exceeded.The request failed request-body validation. -
Method Summary
Modifier and TypeMethodDescriptiontoString()static BraveErrorCodeReturns the enum constant of this class with the specified name.static BraveErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INTERNAL
An internal server error. -
QUOTA_LIMITED
The request quota for the current period has been exhausted. -
RATE_LIMITED
The request was rate-limited; the client should honor theX-RateLimit-Resetwindow. -
SUBSCRIPTION_TOKEN_INVALID
The provided subscription token is not valid. -
SUBSCRIPTION_NOT_FOUND
The subscription token does not match any active subscription. -
RESOURCE_NOT_ALLOWED
The requested resource is not allowed under the current subscription plan. -
OPTION_NOT_IN_PLAN
The requested option is not included in the current subscription plan. -
USAGE_LIMIT_EXCEEDED
The usage limit for the current subscription has been exceeded. -
INVALID_URL
The request contained an invalid URL parameter. -
VALIDATION
The request failed request-body validation.
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
toString
- Overrides:
toStringin classEnum<BraveErrorCode>
-