APIError

public enum APIError : LocalizedError

Enum indicating an error returned by the APIClient

  • Endpoint requested without being authentificated

    Declaration

    Swift

    case notAuthenticated
  • Invalid credentials used to authentificate request

    Declaration

    Swift

    case wrongCredentials
  • A parameter in the request is missing

    Declaration

    Swift

    case missing(parameter: String)
    Parameters
    parameter

    Textual representation of the missing parameter

  • A gateway with the same IMEI already exists for that account

    Declaration

    Swift

    case gatewayAlreadyExists
  • The gateway with the supplied IMEI does not exist

    Declaration

    Swift

    case noGatewayFound
  • An internal database error occurred

    Declaration

    Swift

    case databaseError(desc: String)
    Parameters
    desc

    Textual description of the error

  • The supplied mail address has already been used for an account

    Declaration

    Swift

    case deviceAlreadyExists
  • The supplied mail address has already been used for an account

    Declaration

    Swift

    case mailAlreadyExists
  • No SPDevice with the supplied identifier was found

    Declaration

    Swift

    case noDeviceFound
  • The supplied SPGateway is not connected to the service right now

    Declaration

    Swift

    case gatewayNotConnected(withIMEI: String)
    Parameters
    withIMEI

    IMEI of the respective SPGateway

  • The user does not have any SPGateways connected to his/her account

    Declaration

    Swift

    case noGatewaysForUser
  • The user does not have any SPDevices conntected to his/her account

    Declaration

    Swift

    case noDevicesForUser
  • An error occurred while parsing the response

    Declaration

    Swift

    case parsingError
  • The device does not have a network connection and therefore can not reach the API

    Declaration

    Swift

    case noNetworkConnection
  • The iCloud User Identifier for this account differs from the one of this devices Apple ID

    Declaration

    Swift

    case differentCloudUserId
  • Another error occurred

    Declaration

    Swift

    case other(desc: String)
    Parameters
    desc

    Textual description of the error

  • Overriding errorDescription to get a better error output

    Declaration

    Swift

    public var errorDescription: String? { get }