Back to Alamofire

ResponseSerializationFailureReason

docs/Enums/AFError/ResponseSerializationFailureReason.html

5.12.01.9 KB
Original Source

ResponseSerializationFailureReason

public enum ResponseSerializationFailureReason : Sendable

The underlying reason the response serialization error occurred.

`

                inputDataNilOrZeroLength
                `

The server response contained no data or the data was zero length.

Declaration

Swift

case inputDataNilOrZeroLength

`

                inputFileNil
                `

The file containing the server response did not exist.

Declaration

Swift

case inputFileNil

`

                inputFileReadFailed(at:)
                `

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

Declaration

Swift

case inputFileReadFailed(at: URL)

`

                stringSerializationFailed(encoding:)
                `

String serialization failed using the provided String.Encoding.

Declaration

Swift

case stringSerializationFailed(encoding: String.Encoding)

`

                jsonSerializationFailed(error:)
                `

JSON serialization failed with an underlying system error.

Declaration

Swift

case jsonSerializationFailed(error: any Error)

`

                decodingFailed(error:)
                `

A DataDecoder failed to decode the response due to the associated Error.

Declaration

Swift

case decodingFailed(error: any Error)

`

                customSerializationFailed(error:)
                `

A custom response serializer failed due to the associated Error.

Declaration

Swift

case customSerializationFailed(error: any Error)

`

                invalidEmptyResponse(type:)
                `

Generic serialization failed for an empty response that wasn’t type Empty but instead the associated type.

Declaration

Swift

case invalidEmptyResponse(type: String)