From 5545708d38b142a43028f5e69a8b2c1832ff1cb9 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Wed, 19 Aug 2020 00:28:16 +0600 Subject: [PATCH] fix after ktor update --- .../TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt index 379db907df..28bfff56d4 100644 --- a/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt +++ b/TelegramBotAPI/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/bot/Ktor/KtorRequestsExecutor.kt @@ -44,7 +44,7 @@ class KtorRequestsExecutor( return handleSafely( { e -> throw if (e is ClientRequestException) { - val content = e.response.readText() + val content = e.response ?.readText() ?: throw e val responseObject = jsonFormatter.decodeFromString(Response.serializer(), content) newRequestException( responseObject,