Код: Выделить всё
runBlocking {
try {
val response = withTimeout(timeout) {
// okhttp network call
}
// do something with Response
} catch (e: TimeoutCancellationException) {
// log exception
} catch(e: Exception) {
// log exception
}
}
Это не то, что воспроизводится локально, а наблюдается в данных.
Подробнее здесь: https://stackoverflow.com/questions/786 ... -exception
Мобильная версия