NetworkError

public enum NetworkError : Error

NetworkError provides a collection of error types which can occur during execution.

  • The error is unkonw

    Declaration

    Swift

    case unknownError
  • The request was cancelled before it finished

    Declaration

    Swift

    case cancelled
  • Missing authorization for the request (HTTP Error 401)

    Declaration

    Swift

    case unauthorized(response: HTTPURLResponse, data: Data?)
  • Invalid payload was send to the server (HTTP Error 400…451)

    Declaration

    Swift

    case clientError(response: HTTPURLResponse?, data: Data?)
  • Error on the server (HTTP Error 500…511)

    Declaration

    Swift

    case serverError(response: HTTPURLResponse?, data: Data?)
  • Parsing the body into expected type failed.

    Declaration

    Swift

    case serializationError(error: Error, data: Data?)
  • Complete request failed.

    Declaration

    Swift

    case requestError(error: Error)
  • Details description of the error.

    Declaration

    Swift

    public var debugDescription: String { get }