Back to Alamofire

ResponseValidationFailureReason

docs/Enums/AFError/ResponseValidationFailureReason.html

5.12.01.6 KB
Original Source

ResponseValidationFailureReason

public enum ResponseValidationFailureReason : Sendable

The underlying reason the .responseValidationFailed error occurred.

`

                dataFileNil
                `

The data file containing the server response did not exist.

Declaration

Swift

case dataFileNil

`

                dataFileReadFailed(at:)
                `

The data file containing the server response at the associated URL could not be read.

Declaration

Swift

case dataFileReadFailed(at: URL)

`

                missingContentType(acceptableContentTypes:)
                `

The response did not contain a Content-Type and the acceptableContentTypes provided did not contain a wildcard type.

Declaration

Swift

case missingContentType(acceptableContentTypes: [String])

`

                unacceptableContentType(acceptableContentTypes:responseContentType:)
                `

The response Content-Type did not match any type in the provided acceptableContentTypes.

Declaration

Swift

case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String)

`

                unacceptableStatusCode(code:)
                `

The response status code was not acceptable.

Declaration

Swift

case unacceptableStatusCode(code: Int)

`

                customValidationFailed(error:)
                `

Custom response validation failed due to the associated Error.

Declaration

Swift

case customValidationFailed(error: any Error)