1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-22 08:13:47 +00:00

fix after ktor update

This commit is contained in:
InsanusMokrassar 2020-08-19 00:28:16 +06:00
parent 5d06d86549
commit 5545708d38

View File

@ -44,7 +44,7 @@ class KtorRequestsExecutor(
return handleSafely( return handleSafely(
{ e -> { e ->
throw if (e is ClientRequestException) { throw if (e is ClientRequestException) {
val content = e.response.readText() val content = e.response ?.readText() ?: throw e
val responseObject = jsonFormatter.decodeFromString(Response.serializer(), content) val responseObject = jsonFormatter.decodeFromString(Response.serializer(), content)
newRequestException( newRequestException(
responseObject, responseObject,