SDKError

public enum SDKError : Error
extension SDKError: CustomStringConvertible

SDK Errors

SDK Setup Errors

  • URL Scheme not set in Info.plist This is an implementation error and can be resolved by setting the CFBundleURLSchemes in Info.plist to include “digime-ca-YOUR_APP_ID” using your actual app identifier in place of YOUR_APP_ID.

    Declaration

    Swift

    case noUrlScheme
  • App identifier is using placeholder value “YOUR_APP_ID” This is an implementation error and can be resolved by using your actual app identifier in place of YOUR_APP_ID.

    Declaration

    Swift

    case invalidAppId
  • The private or public key is invalid This is an implementation error and can be resolved by ensuring that you are using keys beginning with “—–BEGIN RSA {PRIVATE/PUBLIC} KEY—-” as appropriate.

    Declaration

    Swift

    case invalidPrivateOrPublicKey

Runtime Errors

  • The contract needs authorizing. This is either caused by the contract not having been authorized or the contract’s credentials expired requiring user to reauthorize

    Declaration

    Swift

    case authorizationRequired
  • The session used to retrieve data is invalid. To refresh the session, please please request another data query.

    Declaration

    Swift

    case invalidSession
  • Server has returned data which cannot be read

    Declaration

    Swift

    case invalidData
  • File list time out reached as there have been no changes.

    Declaration

    Swift

    case fileListPollingTimeout
  • The contract to link to has not been authorized

    Declaration

    Swift

    case linkedContractNotAuthorized
  • User cancelled authorization

    Declaration

    Swift

    case authorizationCancelled
  • An error occurred when adding a service

    Declaration

    Swift

    case addingServiceFailed
  • Authorization failed with the specified code

    Declaration

    Swift

    case authorizationFailed(code: String)
  • An error occurred when communicating with digi.me server. Contains underlying error - typically an instance of URLError

    Declaration

    Swift

    case urlRequestFailed(error: Error)
  • An unsuccessful HTTP response was returned from digi.me server

    Declaration

    Swift

    case httpResponseError(statusCode: Int, apiError: APIError?)
  • An error occurred while encrypting write request

    Declaration

    Swift

    case writeRequestFailure
  • Unable to encode the metadata associated with a write request

    Declaration

    Swift

    case invalidWriteMetadata
  • This SDK version is no longer supported - please update to latest version

    Declaration

    Swift

    case invalidSdkVersion
  • Requested read options are out of bounds with respect to the contract’s scope

    Declaration

    Swift

    case scopeOutOfBounds
  • Attempting to read with a write contract or write with a read contract

    Declaration

    Swift

    case incorrectContractType
  • Only one call to readAllFiles can be in progress at any time for each DigiMe instance

    Declaration

    Swift

    case alreadyReadingAllFiles
  • An unexpected error has occurred - please contact support

    Declaration

    Swift

    case other

CustomStringConvertible

  • Declaration

    Swift

    public var description: String { get }