Enum Class ErrorCodesClient
- All Implemented Interfaces:
Serializable
,Comparable<ErrorCodesClient>
,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 ConstantsEnum ConstantDescriptionIndicates that the operation is restricted to Astra environments.Indicates an error in client-side serialization.Indicates that an annotation on a bean is invalid.Indicates a field name was invalid and cannot be escaped Dynamic placeholders:'%s'
: The value for the field to escapeIndicates that a field value is invalid.Indicates that a required annotation is missing from a bean.Indicates that a required configuration parameter is missing.Indicates an error in client-side serialization. -
Method Summary
Modifier and TypeMethodDescriptionstatic ErrorCodesClient
Returns the enum constant of this class with the specified name.static ErrorCodesClient[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
ASTRA_RESTRICTED_OPERATION
Indicates that the operation is restricted to Astra environments. Dynamic placeholders:'%s'
: The operation name.'%s'
: The current environment.
-
MISSING_CONFIGURATION
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.
-
INVALID_ANNOTATION
Indicates that an annotation on a bean is invalid. Dynamic placeholders:'%s'
: The name of the invalid annotation.'%s'
: The name of the bean.'%s'
: The cause of the invalid annotation.
-
INVALID_VALUE
Indicates that a field value is invalid. Dynamic placeholders:'%s'
: The invalid value.'%s'
: The name of the field.
-
INVALID_EXPRESSION
Indicates a field name was invalid and cannot be escaped Dynamic placeholders:'%s'
: The value for the field to escape
-
SERIALIZATION_ERROR
Indicates an error in client-side serialization. -
DESERIALIZATION_ERROR
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
-