pull/3135/head
Louis Lam 2 years ago
parent 5cd506e340
commit 0eaaa8b6fa

@ -25,8 +25,11 @@ class Telegram extends NotificationProvider {
return okMsg;
} catch (error) {
let msg = (error.response && error.response.data && error.response.data.description) ? error.response.data.description : "Error without description";
throw new Error(msg);
if (error.response && error.response.data && error.response.data.description) {
throw new Error(error.response.data.description);
} else {
throw new Error(error.message);
}
}
}
}

Loading…
Cancel
Save