ResponseValidationFailureReason
public enum ResponseValidationFailureReason : Sendable
The underlying reason the .responseValidationFailed
error occurred.
-
The data file containing the server response did not exist.
Declaration
Swift
case dataFileNil
-
The data file containing the server response at the associated
URL
could not be read.Declaration
Swift
case dataFileReadFailed(at: URL)
-
The response did not contain a
Content-Type
and theacceptableContentTypes
provided did not contain a wildcard type.Declaration
Swift
case missingContentType(acceptableContentTypes: [String])
-
The response
Content-Type
did not match any type in the providedacceptableContentTypes
.Declaration
Swift
case unacceptableContentType(acceptableContentTypes: [String], responseContentType: String)
-
The response status code was not acceptable.
Declaration
Swift
case unacceptableStatusCode(code: Int)
-
Custom response validation failed due to the associated
Error
.Declaration
Swift
case customValidationFailed(error: any Error)