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); } } }