We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a503b41 commit ca8bfc7Copy full SHA for ca8bfc7
Sources/async-http-client/validate/type/Status.swift
@@ -15,7 +15,7 @@ public extension Http.Validate{
15
16
public typealias Predicate = (Int) -> Bool
17
18
- public typealias ErrorFn = (Int, Data?) -> Error?
+ public typealias ErrorFn = (Int, URLResponse, Data?) -> Error?
19
20
/// Validate by exact value
21
case const(Int = 200)
@@ -60,7 +60,7 @@ public extension Http.Validate.Status{
60
case .predicate(let fn):
61
if !fn(status) { try err(status, response, with: data) }
62
case .check(let checkFn):
63
- if let error = checkFn(status, data){
+ if let error = checkFn(status, response, data){
64
throw error
65
}
66
0 commit comments