https://kotlinlang.org logo
#ktor
Title
# ktor
j

Jan Stoltman

02/28/2020, 12:55 PM
Hey, is there any way to catch exceptions thrown by Ios client engine when there is no internet connection? So far I cannot wrap my head around how swift errors are propagated into kotlin
j

Julius

02/28/2020, 1:44 PM
I use this
Copy code
try {
... request
} catch (err: Throwable) {
    if (err is ResponseException) {
    } else {
         // offlineException
    }
}
3 Views