From 0fe8d04f78c252d7f1d01dd86b3efea98081e9a9 Mon Sep 17 00:00:00 2001 From: Frank Elsinga Date: Sat, 23 Sep 2023 21:40:11 +0200 Subject: [PATCH] made the way telegram handles axios errors like all the other notification providers (#3623) --- server/notification-providers/telegram.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/server/notification-providers/telegram.js b/server/notification-providers/telegram.js index 210e3512a..896b9e08d 100644 --- a/server/notification-providers/telegram.js +++ b/server/notification-providers/telegram.js @@ -28,11 +28,7 @@ class Telegram extends NotificationProvider { return okMsg; } catch (error) { - if (error.response && error.response.data && error.response.data.description) { - throw new Error(error.response.data.description); - } else { - throw new Error(error.message); - } + this.throwGeneralAxiosError(error); } } }