From 3d14c93d89faa38e298b325c4c2ad4b76f0985e0 Mon Sep 17 00:00:00 2001 From: InsanusMokrassar Date: Thu, 24 Oct 2024 22:53:34 +0600 Subject: [PATCH] make DefaultKtorRequestsExecutor now uses runCatching instead of runCatchingSafely --- CHANGELOG.md | 1 + .../inmo/tgbotapi/bot/ktor/base/DefaultKtorRequestsExecutor.kt | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b534b401a..2ea1d59d36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * `Core`: * Add default middleware `ExceptionsThrottlerTelegramBotMiddleware` * Make `TelegramBotMiddlewaresPipelinesHandler` to be default `TelegramBotPipelinesHandler` + * Make `DefaultKtorRequestsExecutor` now uses `runCatching` instead of `runCatchingSafely` ## 18.2.2 diff --git a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/base/DefaultKtorRequestsExecutor.kt b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/base/DefaultKtorRequestsExecutor.kt index e3966257f3..bd29dc2ee6 100644 --- a/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/base/DefaultKtorRequestsExecutor.kt +++ b/tgbotapi.core/src/commonMain/kotlin/dev/inmo/tgbotapi/bot/ktor/base/DefaultKtorRequestsExecutor.kt @@ -47,7 +47,7 @@ class DefaultKtorRequestsExecutor internal constructor( } override suspend fun execute(request: Request): T { - return runCatchingSafely { + return runCatching { logger.v { "Start request $request" } pipelineStepsHolder.onBeforeSearchCallFactory(request, callsFactories) requestsLimiter.limit(request) {