-
The error code.
Declaration
Swift
public var code: Int
-
The title of the error.
Declaration
Swift
public var title: String
-
The message for the error.
Declaration
Swift
public var message: String
-
Detailed information for the error.
Declaration
Swift
public var info: String
-
Server response error status.
Declaration
Swift
public var status: String?
-
Server response error reason.
Declaration
Swift
public var reason: String?
-
Server response error localized message.
Declaration
Swift
public var localizedMessage: String?
-
HTTP Response Status Code
Declaration
Swift
public var httpResponseStatusCode: Int
-
Initializer.
Declaration
Swift
public init(code: Int = 100, title: String = "Error", message: String = "mstr-ios-100", info: String? = "")
Parameters
code
The error code. NOTE: code numbers from Int.min -> 600 are reserved for errors created in the SDK. Avoid using them.
title
Title of the error
message
Message
info
Information
-
Construct an error from NSError.
Declaration
Swift
public init(error: NSError)
Parameters
error
NSError object.
-
Verbose description. Should only be used for debugging only.
Declaration
Swift
public var description: String { get }
-
The error’s kind.
Declaration
Swift
public var kind: ErrorKind { get }
-
This application has no permission to perform this operation. Error Code 600.
Declaration
Swift
@available(*, deprecated, message: "This error will never happen and will be removed in future release") public static let notPermitted: UsherError
-
Invalid or expired access token. Error Code 601.
Declaration
Swift
public static let accessTokenExpired: UsherError
-
The refresh token has expired. Error Code 832.
Declaration
Swift
public static let refreshTokenExpired: UsherError
-
The user already exists. Error Code 900.
Declaration
Swift
public static let userAlreadyExists: UsherError
-
User not found. Error Code 901.
Declaration
Swift
public static let userNotFound: UsherError
-
Invalid user ID. Error Code 902.
Declaration
Swift
public static let invalidUserId: UsherError
-
Invalid credential. Error Code 903.
Declaration
Swift
public static let invalidCredential: UsherError
-
User Locked. Error Code 904.
Declaration
Swift
public static let userLocked: UsherError
-
Invalid key version. Error Code 905.
Declaration
Swift
public static let invalidKeyVersion: UsherError
-
Invalid input. Error Code 906.
Declaration
Swift
public static let invalidInput: UsherError
-
Password encryption failed. Error Code 10004.
Declaration
Swift
public static let passwordEncryptionFailed: UsherError
-
Invalid image. Error Code 10005.
Declaration
Swift
@available(*, deprecated, message: "This error will never happen and will be removed in future release") public static let invalidImage: UsherError
-
Invalid server URL. Error Code 10006.
Declaration
Swift
public static let invalidServerUrl: UsherError
-
User is not logged in. Error Code 10007.
Declaration
Swift
public static let userNotLoggedIn: UsherError
-
Password policy cannot be retrieved. Error Code 11000.
Declaration
Swift
@available(*, deprecated, message: "This error will never happen and will be removed in future release") public static let passwordPolicyError: UsherError
-
Generic password policy validation error. Error Code 11001.
Declaration
Swift
public static let passwordValidationGenericError: UsherError
-
Password is less than the allowed minimum length. Error Code 11002.
Declaration
Swift
public static let passwordTooShort: UsherError
-
Password is longer than the allowed maximum length. Error Code 11003.
Declaration
Swift
public static let passwordTooLong: UsherError
-
Password doesn’t contain any lower case character. Error Code 11004.
Declaration
Swift
public static let noLowerCaseInPassword: UsherError
-
Password doesn’t contain any upper case character. Error Code 11005.
Declaration
Swift
public static let noUpperCaseInPassword: UsherError
-
Password doesn’t contain any numeric character. Error Code 11006.
Declaration
Swift
public static let noNumberInPassword: UsherError
-
Password doesn’t contain at least one allowed special character. Error Code 11007.
Declaration
Swift
public static let noSymbolsInPassword: UsherError
-
Password contains one or more not allowed special symbols. Error Code 11008.
Declaration
Swift
public static let notAllowedSymbolsInPassword: UsherError
-
Invalid email address. Error Code 11009.
Declaration
Swift
public static let invalidEmailAddress: UsherError
-
Password doesn’t contain at least one alphabetic character. Error code 11010.
Declaration
Swift
public static let noAlphabeticCharInPassword: UsherError
-
Old password is invalid while trying to change the password. Error code 11011.
Declaration
Swift
public static let oldPasswordInvalid: UsherError
-
Password history policy not met. Error code 11012.
Declaration
Swift
public static let passwordHistroyPolicyNotMet: UsherError
-
Authentication was not successful because the user failed to provide valid credentials. Error Code 12000.
Declaration
Swift
public static let bioAuthenticationFailed: UsherError
-
Authentication could not start because the passcode is not set on the device. Error Code 12001.
Declaration
Swift
public static let passcodeNotSet: UsherError
-
Biometric authentication canceled by system. Error Code 12002.
Declaration
Swift
public static let systemCanceledBioAuthentication: UsherError
-
Biometric authentication canceled by user. Error Code 12003.
Declaration
Swift
public static let userCanceledBioAuthentication: UsherError
-
Biometric authentication user locked out. Error Code 12004.
Declaration
Swift
public static let biometryLockout: UsherError
-
Biometric authentication not available. Error Code 12005.
Declaration
Swift
public static let biometryNotAvailable: UsherError
-
Biometrc authentication not enrolled. Error Code 12006.
Declaration
Swift
public static let biometryNotEnrolled: UsherError
-
Generic biometric authentication error. Error Code 12007.
Declaration
Swift
public static let genericBioAuthenticationError: UsherError
-
Generic error occured when reading data. Error Code 30000.
Declaration
Swift
public static let genericDataError: UsherError
-
Generic keychain error. Error Code 31000.
Declaration
Swift
public static let genericKeychainError: UsherError
-
Generic error occured when reading keychain. Error Code 31001.
Declaration
Swift
public static let keychainDataLoadError: UsherError
-
User canceled biometric authorization for reading keychain. Error Code 31002.
Declaration
Swift
public static let keychainDataUserCancelledBiometricAuthorization: UsherError
-
Keychain data cannot be unlocked. This could happen if keychain was encrypted with biometry and biometry authentication is disabled afterwards. Error Code 31003.
Declaration
Swift
public static let keychainDataCannotBeUnlocked: UsherError
-
SDK is not initialized yet. Error Code 32001.
Declaration
Swift
@available(*, deprecated, message: "This error will never happen and will be removed in future release") public static let sdkNotInitialized: UsherError
-
SDK is initialized with user data reset. Error Code 32002.
Declaration
Swift
public static let sdkInitializedWithUserDataReset: UsherError
-
Other unknown error. Error Code 0.
Declaration
Swift
static let unknown: UsherError
-
An asynchronous load has been canceled. Error Code -999.
Declaration
Swift
static let cancelled: UsherError
-
Request timed out. Error Code -1001.
Declaration
Swift
static let timedOut: UsherError
-
The host name for a URL could not be resolved. Error Code -1003.
Declaration
Swift
static let cannotFindHost: UsherError
-
An attempt to connect to a host failed. Error Code -1004.
Declaration
Swift
static let cannotConnectToHost: UsherError
-
Resource unavailable. Error Code -1008.
Declaration
Swift
static let resourceUnavailable: UsherError
-
A network resource was requested, but an internet connection has not been established and cannot be established automatically. Error Code -1009.
Declaration
Swift
static let offline: UsherError
-
The attempted connection required activating a data context while roaming, but international roaming is disabled. Error Code -1018.
Declaration
Swift
static let internationalRoamingOff: UsherError
-
The cellular network disallowed a connection. Error Code -1020.
Declaration
Swift
static let dataNotAllowed: UsherError
-
An attempt to establish a secure connection failed for reasons that can’t be expressed more specifically. Error Code -1200.
Declaration
Swift
static let clientCertificateInvalid: UsherError
-
A server certificate was rejected. Error Code -1205.
Declaration
Swift
static let clientCertificateRejected: UsherError
-
Generic SDK error. Error Code 100.
Declaration
Swift
static let generic: UsherError
-
JSON parsing failed. Error Code 101.
Declaration
Swift
static let jsonParsingFailed: UsherError
-
Jailbroken device. Error Code 102.
Declaration
Swift
static let deviceJailbroken: UsherError
-
Device is not passcode protected. Error Code 103.
Declaration
Swift
static let deviceNotPasscodeProtected: UsherError
-
Invalid deeplink. Error Code 104.
Declaration
Swift
static let invalidDeeplink: UsherError
-
Action cannot be performed in the background. Error Code 105.
Declaration
Swift
static let actionCannotBeDoneInTheBackground: UsherError
-
Server is missing. Error Code 150.
Declaration
Swift
static let missingServer: UsherError
-
Device is missing. Error Code 151.
Declaration
Swift
static let missingDevice: UsherError
-
Request configuration is missing. Error Code 152.
Declaration
Swift
static let missingRequestConfiguration: UsherError
-
Access token is missing. Error Code 153.
Declaration
Swift
static let missingAccessToken: UsherError
-
Request executor stopped. Error Code 154.
Declaration
Swift
static let requestExecutorStopped: UsherError
-
Failed to create Alamofire request. Error Code 155.
Declaration
Swift
static let alamofireRequestCreationFailed: UsherError
-
The request was cancelled. Error Code 156.
Declaration
Swift
static let requestCancelled: UsherError
-
Request is not executable. Error Code 157.
Declaration
Swift
static let requestNotExecutable: UsherError
-
Access token is invalid. Error Code 158.
Declaration
Swift
static let invalidAccessToken: UsherError
-
Refresh token is invalid. Error Code 159.
Declaration
Swift
static let invalidRefreshToken: UsherError
-
Generic API Request error. Error Code 199.
Declaration
Swift
static let genericAPIRequestError: UsherError
-
The server cannot or will not process the request due to an apparent client error. Error Code 400.
Declaration
Swift
static let badRequest: UsherError
-
Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided. Error Code 401.
Declaration
Swift
static let unauthorized: UsherError
-
The request was valid, but the server is refusing action. The user might not have the necessary permissions for a resource. Error Code 403.
Declaration
Swift
static let forbidden: UsherError
-
The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible. Error Code 404.
Declaration
Swift
static let notFound: UsherError
-
A request method is not supported for the requested resource. For example, a GET request on a form that requires data to be presented via POST, or a PUT request on a read-only resource. Error Code 405.
Declaration
Swift
static let methodNotAllowed: UsherError
-
The server timed out waiting for the request. Error Code 408.
Declaration
Swift
static let requestTimedOut: UsherError
-
A generic error message, given when an unexpected condition was encountered and no more specific message is suitable. Error Code 500.
Declaration
Swift
static let internalServerError: UsherError
-
The server either does not recognize the request method or lacks the ability to fulfill the request. Usually this implies future availability. Error Code 501.
Declaration
Swift
static let notImplemented: UsherError
-
Bad gateway error. Error Code 502.
Declaration
Swift
static let badGateway: UsherError
-
The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state. Error Code 503.
Declaration
Swift
static let serviceUnavailable: UsherError