ClientError

public enum ClientError : Error

The errors that can occur from client facing APIs

  • A networking error occured between the client and the identity server or the client and the server that was being requested

    Declaration

    Swift

    case networkingError(Error)
  • Occurs when IdentityManager.validate(oneTimeCode:) is given an incorrect code

    Declaration

    Swift

    case invalidCode
  • Occurs when you request a scope that you do not have access to

    Declaration

    Swift

    case invalidScope
  • Occurs when IdentityManager.resendCode cannot resend the code

    Declaration

    Swift

    case unableToResend
  • Occurs when ‘IdentityManager.sendCode(to:completion:)` is given an invalid phone number

    Declaration

    Swift

    case invalidPhoneNumber
  • Occurs when a malformed e-mail is provided to an IdentityManager API call.

    Declaration

    Swift

    case invalidEmail
  • Occurs when a valid user object is needed but the user object is not valid

    Declaration

    Swift

    case invalidUser
  • Occurs when an identifier is invalid

    Declaration

    Swift

    case unexpectedIdentifier(actual: Identifier, expected: String)
  • Occurs when user credentials are invalid using email/password APIs

    Declaration

    Swift

    case invalidUserCredentials(message: String?)
  • Occurs when client credentials are invalid

    Declaration

    Swift

    case invalidClientCredentials
  • Occurs when password is shorter than 8 characters

    Declaration

    Swift

    case passwordTooShort
  • Occurs when you try to login with an unverified email

    Declaration

    Swift

    case unverifiedEmail
  • Occurs when you try to signup with an identifier that’s already registered

    Declaration

    Swift

    case alreadyRegistered(message: String)
  • Occurs when there’s a user refresh failure (i.e. an authenticated request failure)

    Declaration

    Swift

    case userRefreshFailed(Error)
  • Occurs when the limit of requests per minute is exceeded

    Declaration

    Swift

    case tooManyRequests
  • Could be anything. The world is its oyster.

    Declaration

    Swift

    case unexpected(Error)
  • Will happen when the user is missing some agreements

    Declaration

    Swift

    case agreements
  • Occurs when an invalid payload data is send to device api

    Declaration

    Swift

    case invalidDevicePayloadData
  • Will happen if a required field is failing validation

    Declaration

    Swift

    case requiredField([String])
  • Occurs when user does not have access to a requested resource (e.g. a product)

    Declaration

    Swift

    case noAccess
  • When the SDK returns custom NSError objects. The domain is set to this.

    Declaration

    Swift

    public static let domain: String
  • This is the error code inside the NSError object that is returned from URLSession.dataTask(with:completion:) in the case that the number of refresh retries has been exceeded

    Declaration

    Swift

    public static let RefreshRetryExceededCode: Int
  • Declaration

    Swift

    public var description: String { get }