diff --git a/CHANGELOG.md b/CHANGELOG.md index ae7534f3de..b718141c7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -50,6 +50,8 @@ * `UUID`: `0.2.1` -> `0.2.2` * `TelegramBotAPI-core`: * `ExceptionHandler` has changed its incoming type: `Exception` -> `Throwable` + * `handleSafely` has changed its signature + * `executeUnsafe` has changed its signature ## 0.27.0 diff --git a/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/shortcuts/RequestsExecutor.kt b/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/shortcuts/RequestsExecutor.kt index 5157918216..61576dec2a 100644 --- a/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/shortcuts/RequestsExecutor.kt +++ b/TelegramBotAPI-extensions-utils/src/commonMain/kotlin/com/github/insanusmokrassar/TelegramBotAPI/extensions/utils/shortcuts/RequestsExecutor.kt @@ -24,10 +24,10 @@ suspend fun RequestsExecutor.executeUnsafe( request: Request, retries: Int = 0, retriesDelay: Long = 1000L, - onAllFailed: (suspend (exceptions: Array) -> Unit)? = null + onAllFailed: (suspend (exceptions: Array) -> Unit)? = null ): T? { var leftRetries = retries - val exceptions = onAllFailed ?.let { mutableListOf() } + val exceptions = onAllFailed ?.let { mutableListOf() } do { return handleSafely( {