Skip to content

Commit

Permalink
Minor
Browse files Browse the repository at this point in the history
  • Loading branch information
louislam committed May 8, 2023
1 parent 5cd506e commit 0eaaa8b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions server/notification-providers/telegram.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
}
}
Expand Down

0 comments on commit 0eaaa8b

Please sign in to comment.