made the way telegram handles axios errors like all the other notification providers (#3623)

This commit is contained in:
Frank Elsinga 2023-09-23 21:40:11 +02:00 committed by GitHub
parent 7c49f7e5a6
commit 0fe8d04f78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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