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

unwrapCancellationException

expect fun Throwable.unwrapCancellationException(): Throwable

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