Package com.glideapi.exceptions
Enum Class MagicAuthErrorCode
- All Implemented Interfaces:
Serializable,Comparable<MagicAuthErrorCode>,Constable
Error codes matching Go/Node SDKs and backend error codes
These are the non-internal error codes that can be safely exposed to users
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescription -
Method Summary
Modifier and TypeMethodDescriptiongetCode()intGet the appropriate HTTP status code for this errorGet user-friendly error message for each codebooleanCheck if error is retryabletoString()static MagicAuthErrorCodeReturns the enum constant of this class with the specified name.static MagicAuthErrorCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
BAD_REQUEST
-
VALIDATION_ERROR
-
MISSING_PARAMETERS
-
INVALID_PHONE_NUMBER
-
SESSION_NOT_FOUND
-
INVALID_VERIFICATION
-
CARRIER_NOT_ELIGIBLE
-
UNSUPPORTED_PLATFORM
-
PHONE_NUMBER_MISMATCH
-
INVALID_CREDENTIAL_FORMAT
-
UNPROCESSABLE_ENTITY
-
RATE_LIMIT_EXCEEDED
-
INTERNAL_SERVER_ERROR
-
SERVICE_UNAVAILABLE
-
-
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
-
getCode
-
toString
- Overrides:
toStringin classEnum<MagicAuthErrorCode>
-
getUserMessage
Get user-friendly error message for each code -
getHttpStatus
public int getHttpStatus()Get the appropriate HTTP status code for this error -
isRetryable
public boolean isRetryable()Check if error is retryable
-