Skip to content

Commit 0c5534f

Browse files
authored
Always fail parsing on deferred capture if we reach the parsing stage (#173)
Add commment
1 parent bbf8144 commit 0c5534f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/ForageSDK/Foundation/Network/LiveForageService.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,10 @@ class LiveForageService: ForageService {
156156
// MARK: Private structs
157157

158158
/// `Empty` used to signify a generic, decodable type that returns nothing
159-
private struct Empty: Decodable {}
159+
private struct Empty: Decodable {
160+
// stopgap to catch malformed responses, because Decodable {} (empty) treats every response as decodable
161+
let dummyResponse: String
162+
}
160163

161164
/// `ForageRequestModel` used for compose ForageSDK requests
162165
private struct ForageRequestModel: Codable {

0 commit comments

Comments
 (0)