ServiceError

public enum ServiceError : Error

Errors from the API or from the decoding of the responses.

  • Bad Request (HTTP status code 400). The request is invalid and cannot be accepted.

    Declaration

    Swift

    case badRequest(ErrorResponse)
  • Unauthorized (HTTP status code 401).

    Declaration

    Swift

    case unauthorized(ErrorResponse)
  • Forbidden (HTTP status code 403). The request is not allowed. This can happen if your API key is revoked, your token is incorrectly formatted, or if the requested operation is not allowed.

    Declaration

    Swift

    case forbidden(ErrorResponse)
  • Not Found (HTTP status code 404). The request cannot be fulfilled because the resource does not exist.

    Declaration

    Swift

    case notFound(ErrorResponse)
  • Conflict (HTTP status code 409). The provided resource data is not valid.

    Declaration

    Swift

    case conflict(ErrorResponse)
  • The date in the response has an unknown format.

    Declaration

    Swift

    case wrongDateFormat(dateString: String)
  • The error is unhandled HTTP error.

    Declaration

    Swift

    case unknownHTTPError(statusCode: Int, data: Data)
  • The error is unknown.

    Declaration

    Swift

    case unknown(data: Data?)
  • A human readable description of the error.

    Declaration

    Swift

    public var description: String? { get }