diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/KtorRequestsExecutor.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/KtorRequestsExecutor.kt index db18339ec3..2d44fb5e36 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/KtorRequestsExecutor.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/Ktor/KtorRequestsExecutor.kt @@ -67,7 +67,7 @@ class KtorRequestsExecutor( return safely( { e -> throw if (e is ClientRequestException) { - val content = e.response ?.readText() ?: throw e + val content = e.response.readText() val responseObject = jsonFormatter.decodeFromString(Response.serializer(), content) newRequestException( responseObject,