ValidateStatus422ErrorBodyStrategy
public struct ValidateStatus422ErrorBodyStrategy : ResponseErrorBodyDecodingStrategy
A strategy for validating the body of a response with a status code of 422.
The ValidateStatus422ErrorBodyStrategy
struct provides a strategy for validating the body of a response with a status code of 422.
Example usage:
@ResponseErrorBodyWrapper<Body, ValidateStatus422ErrorBodyStrategy> var body: Body
-
Determines if the given status code represents an error.
This method checks if the provided status code is equal to the HTTP status code for “Unprocessable Entity” (422).
Declaration
Swift
public static func isError(statusCode: Int) -> Bool
Parameters
statusCode
The status code to check.
Return Value
true
if the status code is 422, otherwisefalse
.