RequestError

extension RequestError

An extension to Kitura RequestErrors with additional error codes specifically for the client.

  • An initializer to set up the client error codes.

    Declaration

    Swift

    public init(clientErrorCode: Int, clientErrorDescription: String, underlyingError: Error? = nil)

    Parameters

    clientErrorCode

    The custom error code for the client.

  • An HTTP 600 unknown error

    Declaration

    Swift

    public static let clientErrorUnknown: RequestError
  • An HTTP 601 connection error

    Declaration

    Swift

    public static let clientConnectionError: RequestError
  • An HTTP 602 no data error

    Declaration

    Swift

    public static let clientNoData: RequestError
  • An HTTP 603 serialization error

    Declaration

    Swift

    public static let clientSerializationError: RequestError
  • An HTTP 604 deserialization error

    Declaration

    Swift

    public static let clientDeserializationError: RequestError
  • An HTTP 605 encoding error

    Declaration

    Swift

    public static let clientEncodingError: RequestError
  • An HTTP 606 file manager error

    Declaration

    Swift

    public static let clientFileManagerError: RequestError
  • An HTTP 607 invalid file error

    Declaration

    Swift

    public static let clientInvalidFile: RequestError
  • An HTTP 608 invalid substitution error

    Declaration

    Swift

    public static let clientInvalidSubstitution: RequestError
  • An HTTP 609 encoding error

    Declaration

    Swift

    public static let clientDecodingError: RequestError
  • An initializer to switch between different error types.

    Declaration

    Swift

    public init(restError: RestError)

    Parameters

    restError

    The custom error type for the client.