From 239a77858b4ca11e1a379685ec4441c272a208c9 Mon Sep 17 00:00:00 2001 From: Tobias Waslowski Date: Mon, 4 Nov 2024 09:12:55 +0100 Subject: [PATCH] feat: Ensure Telegram API Error Exception details are not being masked --- .../java/org/telegram/telegrambots/longpolling/BotSession.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/telegrambots-longpolling/src/main/java/org/telegram/telegrambots/longpolling/BotSession.java b/telegrambots-longpolling/src/main/java/org/telegram/telegrambots/longpolling/BotSession.java index 6edb5d975..e5af4c8e5 100644 --- a/telegrambots-longpolling/src/main/java/org/telegram/telegrambots/longpolling/BotSession.java +++ b/telegrambots-longpolling/src/main/java/org/telegram/telegrambots/longpolling/BotSession.java @@ -152,7 +152,7 @@ private List getUpdatesFromTelegram() throws TelegramApiRequestException throw new TelegramApiErrorResponseException(response.code(), response.message()); } } - } catch (Exception e) { + } catch (IOException e) { throw new TelegramApiErrorResponseException(e); }