In this project, the network exceptions are handled in ViewModel and it's not a good approach. How can we handle network errors such as 404, 500, etc inside of the repository?
I see you are using viewModelScope for API calls without switching the context.
viewModelScope uses Dispatcher.Main, so it is not appropriate to directly launch the coroutine. It should be viewModelScope.lauch(Dispatcher.IO){ //api calls }
Please correct me if I'm wrong.
Thanks for the repo.
I working with the pattern which is more helpful and reduces half of work in my project. But when i am dealing with multiple table handling, it doesn't let me to do. can please suggest me any solution?