ktor-client-core / io.ktor.client.utils / kotlin.Throwable

Extensions for kotlin.Throwable

unwrapCancellationException

expect fun Throwable.unwrapCancellationException(): Throwable

If the exception contains cause that differs from CancellationException returns it otherwise returns itself.