mirror of
https://github.com/louislam/uptime-kuma.git
synced 2025-01-18 10:28:05 +00:00
made the way telegram handles axios errors like all the other notification providers (#3623)
This commit is contained in:
parent
7c49f7e5a6
commit
0fe8d04f78
1 changed files with 1 additions and 5 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue