Enum Class ClientErrorCodes
- All Implemented Interfaces:
Serializable
,Comparable<ClientErrorCodes>
,Constable
Represents client error codes used to standardize error reporting in the application.
Each error code is associated with a unique identifier (`code`) and a descriptive message (`message`).
This enum is designed to facilitate consistent error handling and logging across various components. Some codes are pre-configured with detailed messages that accept placeholders for dynamic values, while others are placeholders for future implementation.
Example usage:
String errorCode = ClientErrorCodes.CONFIG_MISSING.getCode();
String errorMessage = String.format(ClientErrorCodes.CONFIG_MISSING.getMessage(), "paramName", "operationName");
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIndicates that a required configuration parameter is missing.Indicates an error related to cursor operations.Indicates that the operation is restricted to Astra environments.Generic client error with no specific message.Indicates an HTTP error encountered by the client.Indicates an operation was interrupted.Indicates that a required annotation is missing from a bean.Placeholder for random client errors.Indicates an error in client-side serialization.Indicates a timeout error encountered by the client. -
Method Summary
Modifier and TypeMethodDescriptionstatic ClientErrorCodes
Returns the enum constant of this class with the specified name.static ClientErrorCodes[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ENV_RESTRICTED_ASTRA
Indicates that the operation is restricted to Astra environments. Dynamic placeholders:'%s'
: The operation name.'%s'
: The current environment.
-
CONFIG_MISSING
Indicates that a required configuration parameter is missing. Dynamic placeholders:'%s'
: The name of the missing configuration parameter.'%s'
: The operation requiring the parameter.
-
MISSING_ANNOTATION
Indicates that a required annotation is missing from a bean. Dynamic placeholders:'%s'
: The name of the missing annotation.'%s'
: The name of the bean.'%s'
: The operation requiring the annotation.
-
ERROR
Generic client error with no specific message. -
HTTP
Indicates an HTTP error encountered by the client. -
TIMEOUT
Indicates a timeout error encountered by the client. -
INTERRUPTED
Indicates an operation was interrupted. -
RANDOM
Placeholder for random client errors. -
CURSOR
Indicates an error related to cursor operations. -
SERIALIZATION
Indicates an error in client-side serialization.
-
-
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
-