I am following Stewart Lynch’s excellent second video in the concurrency series and encountering an issue when calling the apiService.
Stewart’s code can be seen at this timestamp https://youtu.be/_tnbwaHpJpM?t=321
My code is here github. Relevant files are:
- APIService
- UsersListViewModel (error is here)
- Models [Users, Posts]
(the forum wouldn’t allow me to post more than 2 links, so I couldn’t separate them – sorry about that!)
The error messages read:
Cannot convert value of type '(Result<[User], APIError>) -> Void' to expected argument type '(Result<[User], Error>) -> Void'
Cannot convert value of type '(Result<[User], APIError>) -> Void' to expected argument type '(Result<[User], Error>) -> Void'
I reviewed video 1 to ensure the User struct matched. The APIError is referencing a valid Error type. And the function isn’t returning anything, so it satisfied Void. I’m stumped! Is anyone else experiencing this?