Hi guys, where should i handle networking errors w...
# coroutines
o
Hi guys, where should i handle networking errors with the api in the MVVM pattern?
i
o
Thank you very much :)
c
Yeah, I’d say the same. Handle API errors within the Repository and expose a “result type” from the Repository, rather than throwing an exception from the Repository.
❤️ 3
o
Okay, so i have to make an extra class, let's say "SafeApiRequest", then a function in it to make the request and to throw an exception, if needed. Then i extend this class in my repository and make the api call through it. Is that right?
i
You can FP all the way and leave only a function