Skip to content

Commit

Permalink
Improves Mock errors
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsprint09 committed Nov 25, 2024
1 parent 7a0784c commit 14f49dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/NetworkServices/NetworkServiceMock.swift
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ public final class NetworkServiceMock: NetworkService, @unchecked Sendable {
let result = try resource.parse(data)
return .success((result, httpURLResponse))
} catch {
fatalError("Not able to parse data. Error: \(error)")
return .failure(.serializationError(error: error, response: httpURLResponse, data: data))
}
case .failure(let error):
return .failure(error)
Expand Down

0 comments on commit 14f49dc

Please sign in to comment.