-
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 AFError
Error
, 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 explicitlyCancelled
URLConvertible
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 sessionDeinitialized
Session
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: Bool
Returns whether the instance is .sessionInvalidated
.
var isSessionInvalidatedError: Bool
Returns whether the instance is .explicitlyCancelled
.
var isExplicitlyCancelledError: Bool
Returns whether the instance is .invalidURL
.
var isInvalidURLError: Bool
Returns whether the instance is .parameterEncodingFailed
. When true
, the underlyingError
property will
contain the associated value.
var isParameterEncodingError: Bool
Returns whether the instance is .parameterEncoderFailed
. When true
, the underlyingError
property will
contain the associated value.
var isParameterEncoderError: Bool
Returns whether the instance is .multipartEncodingFailed
. When true
, the url
and underlyingError
properties will contain the associated values.
var isMultipartEncodingError: Bool
Returns whether the instance is .requestAdaptationFailed
. When true
, the underlyingError
property will
contain the associated value.
var isRequestAdaptationError: Bool
Returns whether the instance is .responseValidationFailed
. When true
, the acceptableContentTypes
,
responseContentType
, responseCode
, and underlyingError
properties will contain the associated values.
var isResponseValidationError: Bool
Returns whether the instance is .responseSerializationFailed
. When true
, the failedStringEncoding
and
underlyingError
properties will contain the associated values.
var isResponseSerializationError: Bool
Returns whether the instance is .serverTrustEvaluationFailed
. When true
, the underlyingError
property will
contain the associated value.
var isServerTrustEvaluationError: Bool
Returns whether the instance is requestRetryFailed
. When true
, the underlyingError
property will
contain the associated value.
var isRequestRetryError: Bool
Returns whether the instance is createUploadableFailed
. When true
, the underlyingError
property will
contain the associated value.
var isCreateUploadableError: Bool
Returns whether the instance is createURLRequestFailed
. When true
, the underlyingError
property will
contain the associated value.
var isCreateURLRequestError: Bool
Returns whether the instance is downloadedFileMoveFailed
. When true
, the destination
and underlyingError
properties will
contain the associated values.
var isDownloadedFileMoveError: Bool
Returns whether the instance is createURLRequestFailed
. When true
, the underlyingError
property will
contain the associated value.
var isSessionTaskError: Bool
The 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-Type
s 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