Skip to content

Instantly share code, notes, and snippets.

@dandjelkovic
Last active January 20, 2023 05:01
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dandjelkovic/4b970dfba9447e3163de4e4f5d16dfce to your computer and use it in GitHub Desktop.
Save dandjelkovic/4b970dfba9447e3163de4e4f5d16dfce to your computer and use it in GitHub Desktop.
AlamoFire AFError error codes and their enum case. Helpful for mapping e.g. Crashlytics Issues.
AFError.errorCode 0:
createUploadableFailed(error: Error)
AFError.errorCode 1:
createURLRequestFailed(error: Error)
AFError.errorCode 2:
downloadedFileMoveFailed(error: Error, source: URL, destination: URL)
AFError.errorCode 3:
invalidURL(url: URLConvertible)
AFError.errorCode 4:
multipartEncodingFailed(reason: MultipartEncodingFailureReason)
AFError.errorCode 5:
parameterEncodingFailed(reason: ParameterEncodingFailureReason)
AFError.errorCode 6:
parameterEncoderFailed(reason: ParameterEncoderFailureReason)
AFError.errorCode 7:
requestAdaptationFailed(error: Error)
AFError.errorCode 8:
requestRetryFailed(retryError: Error, originalError: Error)
AFError.errorCode 9:
responseValidationFailed(reason: ResponseValidationFailureReason)
AFError.errorCode 10:
responseSerializationFailed(reason: ResponseSerializationFailureReason)
AFError.errorCode 11:
serverTrustEvaluationFailed(reason: ServerTrustFailureReason)
AFError.errorCode 12:
sessionInvalidated(error: Error?)
AFError.errorCode 13:
sessionTaskFailed(error: Error)
AFError.errorCode 14:
urlRequestValidationFailed(reason: URLRequestValidationFailureReason)
AFError.errorCode 15:
explicitlyCancelled
AFError.errorCode 16:
sessionDeinitialized
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment