1
0
mirror of https://github.com/InsanusMokrassar/TelegramBotAPI.git synced 2024-11-23 02:28:45 +00:00

small refactor

This commit is contained in:
InsanusMokrassar 2021-01-09 19:00:41 +06:00
parent 198b551ebf
commit 3d0cbc2d2b

View File

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