public class UsherException
extends java.lang.RuntimeException
UsherException class wraps all of the exceptions that can be encountered by
the Usher SDK with an identifying name and unique code to help diagnose the root cause.| Modifier and Type | Field and Description |
|---|---|
static int |
EXPIRED_REFRESH_TOKEN
10010, Expired refresh token.
|
static int |
FINGERPRINT_NOT_SUPPORTED
10014, Fingerprint authentication not supported on device.
|
static int |
FINGERPRINT_SIGN_IN_NOT_ENABLED
10016, Fingerprint login not enabled.
|
static int |
FINGERPRINT_VERIFICATION_FAILED
10015, Fingerprint verification failure.
|
static int |
IDENTITY_NOT_VERIFIED
10030, Identity not verified.
|
static int |
INTERNAL_SERVER_ERROR
10012, Internal server error.
|
static int |
INVALID_ACCESS_TOKEN
10011, Invalid access token.
|
static int |
INVALID_CREDENTIAL
10001, Invalid login credentials.
|
static int |
INVALID_INPUT
10002, Invalid input.
|
static int |
INVALID_INPUT_PARAMETER
10034, Invalid input parameter
|
static int |
INVALID_SERVER_URL
10033, Invalid server url
|
static int |
NEED_TO_ENROLL_FINGERPRINT
10013, Fingerprint enrollment required.
|
static int |
NETWORK_INVALID_CERTIFICATE
10008, Invalid certificate for network.
|
static int |
NETWORK_OFFLINE
10006, Network offline.
|
static int |
NETWORK_OTHER_ERROR
10009, Other network error.
|
static int |
NETWORK_TIMEOUT
10007, Network timeout.
|
static int |
NEW_PASSWORD_TOO_RECENT
10027, New password cannot be used because it was used too recently.
|
static int |
OLD_PASSWORD_INCORRECT
10026, Incorrect old password.
|
static int |
PASSWORD_EMPTY
10017, Password empty.
|
static int |
PASSWORD_INVALID_SYMBOL
10024, Invalid symbol in password.
|
static int |
PASSWORD_NO_ALPHA_BETIC
10025, No alphabetic character in password.
|
static int |
PASSWORD_NO_LOWERCASE
10020, No lowercase character in password.
|
static int |
PASSWORD_NO_NUMBER
10022, No number in password.
|
static int |
PASSWORD_NO_REQUIRED_SYMBOL
10023, No symbol in password.
|
static int |
PASSWORD_NO_UPPERCASE
10021, No uppercase character in password.
|
static int |
PASSWORD_POLICY_FAIL
10031, Password policy not met.
|
static int |
PASSWORD_TOO_LONG
10019, Password too long.
|
static int |
PASSWORD_TOO_SHORT
10018, Password too short.
|
static int |
REQUIRE_PRIMARY_DRIVER
10028, IoT device requires a primary driver.
|
static int |
REQUIRED_VALID_OTP_SESSION_REQUIRED
10029, A valid session ID was not provided when resetting the password.
|
static int |
SESSION_INVALID
10032, Session invalid, need to log in
|
static int |
USER_ALREADY_EXIST
10003, User already exists.
|
static int |
USER_LOCKED
10004, User is locked due to too many incorrect login attempts.
|
static int |
USER_NOT_FOUND
10005, User not found.
|
static int |
USHER_SDK_ERROR
9999, Internal Usher SDK error.
|
| Constructor and Description |
|---|
UsherException(int code)
Constructor for a
UsherException with the exception code set. |
UsherException(int code,
ServerResponseData serverResponseData)
Constructor for a
UsherException with the exception code set. |
UsherException(int code,
ServerResponseData serverResponseData,
java.lang.Throwable throwable)
Constructor for a
UsherException with the exception code and the cause set. |
UsherException(int code,
java.lang.String message)
Constructor for a
UsherException with the exception code and detail message set. |
UsherException(int code,
java.lang.String message,
ServerResponseData serverResponseData)
Constructor for a
UsherException with the exception code and detail message set. |
| Modifier and Type | Method and Description |
|---|---|
int |
getCode()
Returns an int of the exception code.
|
ServerResponseData |
getServerResponseData() |
@NotNull java.lang.String |
toString()
Returns a String of the exception code and/or error message in default JSON format.
|
public static final int USHER_SDK_ERROR
public static final int INVALID_CREDENTIAL
public static final int INVALID_INPUT
public static final int USER_ALREADY_EXIST
public static final int USER_LOCKED
public static final int USER_NOT_FOUND
public static final int NETWORK_OFFLINE
public static final int NETWORK_TIMEOUT
public static final int NETWORK_INVALID_CERTIFICATE
public static final int NETWORK_OTHER_ERROR
public static final int EXPIRED_REFRESH_TOKEN
public static final int INVALID_ACCESS_TOKEN
public static final int INTERNAL_SERVER_ERROR
public static final int NEED_TO_ENROLL_FINGERPRINT
public static final int FINGERPRINT_NOT_SUPPORTED
public static final int FINGERPRINT_VERIFICATION_FAILED
public static final int FINGERPRINT_SIGN_IN_NOT_ENABLED
public static final int PASSWORD_EMPTY
public static final int PASSWORD_TOO_SHORT
public static final int PASSWORD_TOO_LONG
public static final int PASSWORD_NO_LOWERCASE
public static final int PASSWORD_NO_UPPERCASE
public static final int PASSWORD_NO_NUMBER
public static final int PASSWORD_NO_REQUIRED_SYMBOL
public static final int PASSWORD_INVALID_SYMBOL
public static final int PASSWORD_NO_ALPHA_BETIC
public static final int OLD_PASSWORD_INCORRECT
public static final int NEW_PASSWORD_TOO_RECENT
public static final int REQUIRE_PRIMARY_DRIVER
public static final int REQUIRED_VALID_OTP_SESSION_REQUIRED
public static final int IDENTITY_NOT_VERIFIED
public static final int PASSWORD_POLICY_FAIL
public static final int SESSION_INVALID
public static final int INVALID_SERVER_URL
public static final int INVALID_INPUT_PARAMETER
public UsherException(int code,
java.lang.String message,
ServerResponseData serverResponseData)
UsherException with the exception code and detail message set.code - the exception codemessage - the detail messageserverResponseData - the response data from serverpublic UsherException(int code,
java.lang.String message)
UsherException with the exception code and detail message set.code - the exception codemessage - the detail messagepublic UsherException(int code,
ServerResponseData serverResponseData,
java.lang.Throwable throwable)
UsherException with the exception code and the cause set.code - the exception codeserverResponseData - the response data from serverthrowable - the cause. See Throwablepublic UsherException(int code,
ServerResponseData serverResponseData)
UsherException with the exception code set.code - the exception codeserverResponseData - the response data from serverpublic UsherException(int code)
UsherException with the exception code set.code - the exception codepublic int getCode()
@Nullable public ServerResponseData getServerResponseData()
@NotNull public @NotNull java.lang.String toString()
toString in class java.lang.Throwable