BittiqApiError

public enum BittiqApiError

An error that was returned from the Bittiq API server.

  • HTTP status code 400. Incorrect data provided.

    Declaration

    Swift

    case incorrectRequestData(error: APIError?)
  • HTTP status code 401. Authorization header is not provided or contains wrong (or expired) token. Re-authorization required.

    Note

    When a 401 server response is encountered, the SDK will always first try to refresh the access token with the refresh token. When this fails, the SDK will call the TokenResolver.resolve(_:) method to acquire new tokens. When this fails, or when the new tokens are also invalid, this error will be thrown.

    Declaration

    Swift

    case unauthorized(error: APIError?)
  • HTTP status code 403. Resource is forbidden for user. This error will occur mainly due to an invalid iOS or SDK version.

    Declaration

    Swift

    case resourceForbidden(error: APIError?)
  • HTTP status code 404. Resource not found. Please check the id of the resource.

    Declaration

    Swift

    case resourceNotFound(error: APIError?)
  • HTTP status code 405. Method not allowed.

    Note

    You should typically not encounter this error as this would indicate an issue with either the SDK or the backend server.

    Declaration

    Swift

    case methodNotAllowed(error: APIError?)
  • HTTP status code 500. An unhandled server error has occurred. Please contact support if the problem persists.

    Declaration

    Swift

    case unhandledServerError(error: APIError?)
  • HTTP status code 503. Service is down. Please try again in a while.

    Declaration

    Swift

    case serviceDown(error: APIError?)
  • HTTP status code 504. Gateway timeout. Service is overloaded or some other problem exists. Please try again in a while.

    Declaration

    Swift

    case gatewayTimeout(error: APIError?)
  • The server’s response was unexpectedly empty. Please contact support if the problem persists.

    Declaration

    Swift

    case noResponseData
  • Any other error code that was returned by the server.

    Declaration

    Swift

    case unknownError(code: Int, error: APIError?)
  • A non-localized error description.

    Declaration

    Swift

    public var errorDescription: String? { get }