```mainScope.launch { try{ ...
# coroutines
m
Copy code
mainScope.launch {

            try{
                val attr1 = async(<http://dispatchers.IO|dispatchers.IO>) { networkUser.setUserAttrs(userId, mappedServerData.weight).blockingFirst() }catch(){} }
b
Because an exception isn’t thrown by the
async
function if the provided block throws an exception. You need to wrap your
.await()
call.
Copy code
val attr1Async = async(IO) { ....blockingFirst() }
try {
    attr1Async.await()
} catch (...) {
    ...
}
m
check below, the call is wrapped, that sample is not complete
👍 1