Skip to content

Commit 29358d4

Browse files
committed
Update ResponseError.swift
1 parent c763e96 commit 29358d4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

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

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,12 @@ public struct ResponseError: Hashable, CustomStringConvertible, LocalizedError,
4545
}
4646
}
4747

48+
49+
/// Processing server cannot or will not process the request due to something that is perceived to be a client error
50+
/// 401 Unauthorized
51+
/// 402 Payment Required
52+
/// - Parameter error: Error
53+
/// - Returns: Error with a decription why server cannot or will not process the request or Error
4854
static func check(_ error : Error) -> Error{
4955

5056
guard case let Http.Errors.status(status, _, data) = error else{
@@ -66,5 +72,4 @@ public struct ResponseError: Hashable, CustomStringConvertible, LocalizedError,
6672
return error
6773

6874
}
69-
7075
}

0 commit comments

Comments
 (0)