avivace / RSSnotifier

Node RSS reader telegram bot. Provides notification on queries-matching elements and supports multiple users.
GNU General Public License v3.0
16 stars 2 forks source link

Further request exception handling #3

Closed dennib closed 7 years ago

dennib commented 7 years ago

Try-catching request to avoid unexpected process exit due to Invalid URI error thrown out

dennib commented 7 years ago

Ok, tried to join Fetching/Parsing code together again in fetch function (avoding tryFetch separate one), besides fetch function is now all try-catched - is this too messy? -. Catch block now logs no hardcoded message, it shows error message property instead, this is only a human friendly explanation of the error, I omitted entire error stack to avoid console spam, but it could be necessary, should I log it too?