-
The error code.
Declaration
Swift
public var code: Int
-
The title of the error.
Declaration
Swift
public var title: String
-
The message of the error.
Declaration
Swift
public var message: String
-
Detailed information of the error.
Declaration
Swift
public var info: String
-
Initializer
Declaration
Swift
public init(code: Int = 100, title: String = "Error", message: String = "Something went wrong. Please try again in a while.", 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 }
-
Other unknown error
Declaration
Swift
public static let unknown: UsherError
-
An asynchronous load has been canceled.
Declaration
Swift
public static let cancelled: UsherError
-
Request timed out
Declaration
Swift
public static let timedOut: UsherError
-
The host name for a URL could not be resolved.
Declaration
Swift
public static let cannotFindHost: UsherError
-
An attempt to connect to a host failed.
Declaration
Swift
public static let cannotConnectToHost: UsherError
-
Resource unavailable
Declaration
Swift
public static let resourceUnavailable: UsherError
-
A network resource was requested, but an internet connection has not been established and cannot be established automatically.
Declaration
Swift
public static let offline: UsherError
-
The attempted connection required activating a data context while roaming, but international roaming is disabled.
Declaration
Swift
public static let internationalRoamingOff: UsherError
-
The cellular network disallowed a connection.
Declaration
Swift
public static let dataNotAllowed: UsherError
-
A server certificate was rejected.
Declaration
Swift
public static let clientCertificateRejected: UsherError
-
Generic SDK error
Declaration
Swift
public static let generic: UsherError
-
JSON parsing failed
Declaration
Swift
public static let jsonParsingFailed: UsherError
-
Jailbroken device
Declaration
Swift
public static let deviceJailbroken: UsherError
-
Device is not passcode protected.
Declaration
Swift
public static let deviceNotPasscodeProtected: UsherError
-
Invalid deeplink
Declaration
Swift
public static let invalidDeeplink: UsherError
-
Action cannot be done in the background
Declaration
Swift
public static let actionCannotBeDoneInTheBackground: UsherError
-
Missing Server
Declaration
Swift
public static let missingServer: UsherError
-
Missing Device
Declaration
Swift
public static let missingDevice: UsherError
-
Missing request configuration
Declaration
Swift
public static let missingRequestConfiguration: UsherError
-
Missing access token
Declaration
Swift
public static let missingAccessToken: UsherError
-
Request executor stopped
Declaration
Swift
public static let requestExecutorStopped: UsherError
-
Failed to create Alamofire request
Declaration
Swift
public static let alamofireRequestCreationFailed: UsherError
-
Request public static let cancelled = UsherError(code: -999)
Declaration
Swift
public static let requestCancelled: UsherError
-
Request is not executable
Declaration
Swift
public static let requestNotExecutable: UsherError
-
Access token is invalid
Declaration
Swift
public static let invalidAccessToken: UsherError
-
Refresh token is invalid
Declaration
Swift
public static let invalidRefreshToken: UsherError
-
Generic API Request Error
Declaration
Swift
public static let genericAPIRequestError: UsherError
-
The server cannot or will not process the request due to an apparent client error
Declaration
Swift
public 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.
Declaration
Swift
public 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, or may need an account of some sort.
Declaration
Swift
public 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.
Declaration
Swift
public 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.
Declaration
Swift
public static let methodNotAllowed: UsherError
-
The server timed out waiting for the request.
Declaration
Swift
public static let requestTimedOut: UsherError
-
A generic error message, given when an unexpected condition was encountered and no more specific message is suitable
Declaration
Swift
public static let internalServerError: UsherError
-
The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability
Declaration
Swift
public static let notImplemented: UsherError
-
Bad gateway error
Declaration
Swift
public static let badGateway: UsherError
-
The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.
Declaration
Swift
public static let serviceUnavailable: UsherError