Skip to content

Commit d9ce1ae

Browse files
committed
Update ResponseError.swift
1 parent e5278e2 commit d9ce1ae

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Sources/replicate-kit-swift/error/ResponseError.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public struct ResponseError: Hashable, CustomStringConvertible, LocalizedError,
5454
/// - response: URLResponse
5555
/// - data: Received data
5656
/// - Returns: Error with a description why server cannot or will not process the request if it managed to parse data response, standard status error or nil if request was successful
57-
internal func errorFn(status: Int, _ response : URLResponse, data: Data?) -> Error?{
57+
internal let errorFn : Http.Validate.Status.ErrorFn = { status, response, data -> Error? in
5858

5959
if (200...299).contains(status) { return nil }
6060

@@ -70,5 +70,5 @@ internal func errorFn(status: Int, _ response : URLResponse, data: Data?) -> Er
7070
return error
7171
}
7272

73-
return Http.Errors.status(status, response, data)
73+
return Http.Errors.status(status, response, data)
7474
}

0 commit comments

Comments
 (0)