Reputation: 133
I'm new with coroutines. Trying to use retrofit + coroutines + Jake Wharton's CoroutineCallAdapterFactory by this tutorial
But don't get how to handle json response errors. For example error could be like that:
{
"code": 105,
"error": "invalid field name: bl!ng"
}
I think adding code and error fields (and checking object for null fields) in TmdbMovie class - it's wrong. And then - how to use error fields after launching coroutine in TmdbViewModel ?
Upvotes: 7
Views: 5967