Package com.guinetik.rr.result
Enum ApiError.ErrorType
- java.lang.Object
-
- java.lang.Enum<ApiError.ErrorType>
-
- com.guinetik.rr.result.ApiError.ErrorType
-
- All Implemented Interfaces:
Serializable,Comparable<ApiError.ErrorType>
- Enclosing class:
- ApiError
public static enum ApiError.ErrorType extends Enum<ApiError.ErrorType>
Enum representing different types of errors that can occur.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTH_ERRORAuthentication/authorization errorCIRCUIT_OPENCircuit breaker is openCONFIG_ERRORClient configuration errorHTTP_ERRORHTTP error from serverNETWORK_ERRORNetwork connectivity errorPARSE_ERRORError parsing responseUNKNOWNUnknown error
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ApiError.ErrorTypevalueOf(String name)Returns the enum constant of this type with the specified name.static ApiError.ErrorType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
HTTP_ERROR
public static final ApiError.ErrorType HTTP_ERROR
HTTP error from server
-
NETWORK_ERROR
public static final ApiError.ErrorType NETWORK_ERROR
Network connectivity error
-
PARSE_ERROR
public static final ApiError.ErrorType PARSE_ERROR
Error parsing response
-
AUTH_ERROR
public static final ApiError.ErrorType AUTH_ERROR
Authentication/authorization error
-
CONFIG_ERROR
public static final ApiError.ErrorType CONFIG_ERROR
Client configuration error
-
CIRCUIT_OPEN
public static final ApiError.ErrorType CIRCUIT_OPEN
Circuit breaker is open
-
UNKNOWN
public static final ApiError.ErrorType UNKNOWN
Unknown error
-
-
Method Detail
-
values
public static ApiError.ErrorType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (ApiError.ErrorType c : ApiError.ErrorType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ApiError.ErrorType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified nameNullPointerException- if the argument is null
-
-