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
URLcould not be read.Declaration
Swift
case dataFileReadFailed(at: URL) -
The response did not contain a
Content-Typeand theacceptableContentTypesprovided did not contain a wildcard type.Declaration
Swift
case missingContentType(acceptableContentTypes: [String]) -
The response
Content-Typedid 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)
View on GitHub
Install in Dash