AFError

public enum AFError : Error

AFError is the error type returned by Alamofire. It encompasses a few different types of errors, each with their own associated reasons.

  • The URLConvertible associated with the error.

    Declaration

    Swift

    public var urlConvertible: URLConvertible? { get }
  • url

    The URL associated with the error.

    Declaration

    Swift

    public var url: URL? { get }
  • The underlying Error responsible for generating the failure associated with .sessionInvalidated, .parameterEncodingFailed, .parameterEncoderFailed, .multipartEncodingFailed, .requestAdaptationFailed, .responseSerializationFailed, .requestRetryFailed errors.

    Declaration

    Swift

    public var underlyingError: Error? { get }
  • The acceptable Content-Types of a .responseValidationFailed error.

    Declaration

    Swift

    public var acceptableContentTypes: [String]? { get }
  • The response Content-Type of a .responseValidationFailed error.

    Declaration

    Swift

    public var responseContentType: String? { get }
  • The response code of a .responseValidationFailed error.

    Declaration

    Swift

    public var responseCode: Int? { get }
  • The String.Encoding associated with a failed .stringResponse() call.

    Declaration

    Swift

    public var failedStringEncoding: String.Encoding? { get }
  • Declaration

    Swift

    public var errorDescription: String? { get }