Skip to content

Commit ca8bfc7

Browse files
committed
Update Status.swift
1 parent a503b41 commit ca8bfc7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/async-http-client/validate/type/Status.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public extension Http.Validate{
1515

1616
public typealias Predicate = (Int) -> Bool
1717

18-
public typealias ErrorFn = (Int, Data?) -> Error?
18+
public typealias ErrorFn = (Int, URLResponse, Data?) -> Error?
1919

2020
/// Validate by exact value
2121
case const(Int = 200)
@@ -60,7 +60,7 @@ public extension Http.Validate.Status{
6060
case .predicate(let fn):
6161
if !fn(status) { try err(status, response, with: data) }
6262
case .check(let checkFn):
63-
if let error = checkFn(status, data){
63+
if let error = checkFn(status, response, data){
6464
throw error
6565
}
6666
}

0 commit comments

Comments
 (0)