BoxError

public enum BoxError : Error

Defines error values for the whole SDK

  • Result of an API request. Contains specific BoxAPIError.

    Declaration

    Swift

    case apiError(error: BoxAPIError)

    Parameters

    error

    BoxApiError specifying the issue.

  • Could not encode an object.

    Declaration

    Swift

    case encoding(error: Error)
  • Could not decode an object.

    Declaration

    Swift

    case decoding(error: Error)

    Parameters

    error

    Thrown error - either BoxDecodingError or standard swift decoding Error.

  • Request had its maximum number of retries.

    Declaration

    Swift

    case rateLimitMaxRetries
  • Response body was a different type than expected. Usually did not find expected JSON.

    Declaration

    Swift

    case invalidResponse
  • Network failure.

    Declaration

    Swift

    case network(message: String)
  • Access token has expired.

    Declaration

    Swift

    case expiredToken
  • Tried to use a BoxClient instance that was already destroyed.

    Declaration

    Swift

    case clientDestroyed
  • Expected result is not found in a valid request response.

    Declaration

    Swift

    case notFound
  • Unsuccessful token retrieval. Token was not found.

    Declaration

    Swift

    case tokenRetrieval
  • Unsuccessful refresh token retrieval. Token was not found in the retrieved TokenInfo object.

    Declaration

    Swift

    case refreshTokenNotFound
  • Unauthorized request.

    Declaration

    Swift

    case unauthorizedAccess
  • Failed OAuth web session authorization.

    Declaration

    Swift

    case invalidOAuthRedirectConfiguration
  • Couldn’t obtain authorization code from OAuth web session success result.

    Declaration

    Swift

    case invalidOAuthState
  • Authorization with JWT token failed.

    Declaration

    Swift

    case jwtAuthError(error: Error)

    Parameters

    error

    Thrown error.

  • Object needed in closure was already deallocated.

    Declaration

    Swift

    case instanceDeallocated
  • The provided value is not valid in this context.

    Declaration

    Swift

    case invalidValue
  • Could not finish and operation (write, read or clear) on TokenStore object.

    Declaration

    Swift

    case tokenStoreFailure(error: Error)

    Parameters

    error

    Thrown error.

  • Could not decode or encode data for or from keychain.

    Declaration

    Swift

    case keychainDataConversionError
  • Unhandled keychain error

    Declaration

    Swift

    case keychainUnhandledError(message: String)

    Parameters

    message

    Error message.

  • Unspecified unhandled keychain error

    Declaration

    Swift

    case keychainUhandledError
  • Value not found in Keychain.

    Declaration

    Swift

    case keychainNoValue