The feedback for corrupt or unexpected data is lacking.
struct EditPoll: Codable, Equatable {
let name: String
let description: String
let duration: Int
let roomId: UUID
}
Route(.case(PollsRoute.create)) {
Method.post
Body(.json(EditPoll.self))
}
error: The data couldn’t be read because it isn’t in the correct format.
I think the following would print more specific information.
print(String(describing: jsonDecodingError))
``