-
Notifications
You must be signed in to change notification settings - Fork 1
AFError
AFError is the error type returned by Alamofire. It encompasses a few different types of errors, each with
their own associated reasons.
public enum AFErrorError, LocalizedError
UploadableConvertible threw an error in createUploadable().
case createUploadableFailed(error: Error)URLRequestConvertible threw an error in asURLRequest().
case createURLRequestFailed(error: Error)SessionDelegate threw an error while attempting to move downloaded file to destination URL.
case downloadedFileMoveFailed(error: Error, source: URL, destination: URL)Request was explicitly cancelled.
case explicitlyCancelledURLConvertible type failed to create a valid URL.
case invalidURL(url: URLConvertible)Multipart form encoding failed.
case multipartEncodingFailed(reason: MultipartEncodingFailureReason)ParameterEncoding threw an error during the encoding process.
case parameterEncodingFailed(reason: ParameterEncodingFailureReason)ParameterEncoder threw an error while running the encoder.
case parameterEncoderFailed(reason: ParameterEncoderFailureReason)RequestAdapter threw an error during adaptation.
case requestAdaptationFailed(error: Error)RequestRetrier threw an error during the request retry process.
case requestRetryFailed(retryError: Error, originalError: Error)Response validation failed.
case responseValidationFailed(reason: ResponseValidationFailureReason)Response serialization failed.
case responseSerializationFailed(reason: ResponseSerializationFailureReason)ServerTrustEvaluating instance threw an error during trust evaluation.
case serverTrustEvaluationFailed(reason: ServerTrustFailureReason)Session which issued the Request was deinitialized, most likely because its reference went out of scope.
case sessionDeinitializedSession was explicitly invalidated, possibly with the Error produced by the underlying URLSession.
case sessionInvalidated(error: Error?)URLSessionTask completed with error.
case sessionTaskFailed(error: Error)URLRequest failed validation.
case urlRequestValidationFailed(reason: URLRequestValidationFailureReason)Returns whether the instance is .sessionDeinitialized.
var isSessionDeinitializedError: BoolReturns whether the instance is .sessionInvalidated.
var isSessionInvalidatedError: BoolReturns whether the instance is .explicitlyCancelled.
var isExplicitlyCancelledError: BoolReturns whether the instance is .invalidURL.
var isInvalidURLError: BoolReturns whether the instance is .parameterEncodingFailed. When true, the underlyingError property will
contain the associated value.
var isParameterEncodingError: BoolReturns whether the instance is .parameterEncoderFailed. When true, the underlyingError property will
contain the associated value.
var isParameterEncoderError: BoolReturns whether the instance is .multipartEncodingFailed. When true, the url and underlyingError
properties will contain the associated values.
var isMultipartEncodingError: BoolReturns whether the instance is .requestAdaptationFailed. When true, the underlyingError property will
contain the associated value.
var isRequestAdaptationError: BoolReturns whether the instance is .responseValidationFailed. When true, the acceptableContentTypes,
responseContentType, responseCode, and underlyingError properties will contain the associated values.
var isResponseValidationError: BoolReturns whether the instance is .responseSerializationFailed. When true, the failedStringEncoding and
underlyingError properties will contain the associated values.
var isResponseSerializationError: BoolReturns whether the instance is .serverTrustEvaluationFailed. When true, the underlyingError property will
contain the associated value.
var isServerTrustEvaluationError: BoolReturns whether the instance is requestRetryFailed. When true, the underlyingError property will
contain the associated value.
var isRequestRetryError: BoolReturns whether the instance is createUploadableFailed. When true, the underlyingError property will
contain the associated value.
var isCreateUploadableError: BoolReturns whether the instance is createURLRequestFailed. When true, the underlyingError property will
contain the associated value.
var isCreateURLRequestError: BoolReturns whether the instance is downloadedFileMoveFailed. When true, the destination and underlyingError properties will
contain the associated values.
var isDownloadedFileMoveError: BoolReturns whether the instance is createURLRequestFailed. When true, the underlyingError property will
contain the associated value.
var isSessionTaskError: BoolThe URLConvertible associated with the error.
var urlConvertible: URLConvertible?The URL associated with the error.
var url: URL?The underlying Error responsible for generating the failure associated with .sessionInvalidated,
.parameterEncodingFailed, .parameterEncoderFailed, .multipartEncodingFailed, .requestAdaptationFailed,
.responseSerializationFailed, .requestRetryFailed errors.
var underlyingError: Error?The acceptable Content-Types of a .responseValidationFailed error.
var acceptableContentTypes: [String]?The response Content-Type of a .responseValidationFailed error.
var responseContentType: String?The response code of a .responseValidationFailed error.
var responseCode: Int?The String.Encoding associated with a failed .stringResponse() call.
var failedStringEncoding: String.Encoding?The source URL of a .downloadedFileMoveFailed error.
var sourceURL: URL?The destination URL of a .downloadedFileMoveFailed error.
var destinationURL: URL?var errorDescription: String?Generated at 2020-09-24T22:11:06+0000 using swift-doc 1.0.0-beta.4.
Types
- AF
- AFError
- AFError.MultipartEncodingFailureReason
- AFError.ParameterEncoderFailureReason
- AFError.ParameterEncoderFailureReason.RequiredComponent
- AFError.ParameterEncodingFailureReason
- AFError.ResponseSerializationFailureReason
- AFError.ResponseValidationFailureReason
- AFError.ServerTrustFailureReason
- AFError.ServerTrustFailureReason.Output
- AFError.URLRequestValidationFailureReason
- Adapter
- AlamofireExtension
- AlamofireNotifications
- ClosureEventMonitor
- CompositeEventMonitor
- CompositeTrustEvaluator
- ConnectionLostRetryPolicy
- DataRequest
- DataResponse
- DataResponseSerializer
- DecodableResponseSerializer
- DefaultTrustEvaluator
- DisabledEvaluator
- DownloadRequest
- DownloadRequest.Downloadable
- DownloadRequest.Options
- DownloadResponse
- Empty
- GoogleXSSIPreprocessor
- HTTPHeader
- HTTPHeaders
- HTTPMethod
- Interceptor
- JSONEncoding
- JSONParameterEncoder
- JSONResponseSerializer
- MultipartFormData
- NetworkReachabilityManager
- NetworkReachabilityManager.NetworkReachabilityStatus
- NetworkReachabilityManager.NetworkReachabilityStatus.ConnectionType
- PassthroughPreprocessor
- PinnedCertificatesTrustEvaluator
- PublicKeysTrustEvaluator
- Redirector
- Redirector.Behavior
- Request
- Request.State
- ResponseCacher
- ResponseCacher.Behavior
- Retrier
- RetryPolicy
- RetryResult
- RevocationTrustEvaluator
- RevocationTrustEvaluator.Options
- ServerTrustManager
- Session
- SessionDelegate
- StringResponseSerializer
- URLEncodedFormEncoder
- URLEncodedFormEncoder.ArrayEncoding
- URLEncodedFormEncoder.BoolEncoding
- URLEncodedFormEncoder.DataEncoding
- URLEncodedFormEncoder.DateEncoding
- URLEncodedFormEncoder.Error
- URLEncodedFormEncoder.KeyEncoding
- URLEncodedFormEncoder.SpaceEncoding
- URLEncodedFormParameterEncoder
- URLEncodedFormParameterEncoder.Destination
- URLEncoding
- URLEncoding.ArrayEncoding
- URLEncoding.BoolEncoding
- URLEncoding.Destination
- UploadRequest
- UploadRequest.Uploadable
Protocols
- AlamofireExtended
- CachedResponseHandler
- DataDecoder
- DataPreprocessor
- DataResponseSerializerProtocol
- DownloadResponseSerializerProtocol
- EmptyResponse
- EventMonitor
- ParameterEncoder
- ParameterEncoding
- RedirectHandler
- RequestAdapter
- RequestDelegate
- RequestInterceptor
- RequestRetrier
- ResponseSerializer
- ServerTrustEvaluating
- URLConvertible
- URLRequestConvertible
- UploadConvertible
- UploadableConvertible