diff --git a/index.js b/index.js index e9ea436..5a36c6f 100644 --- a/index.js +++ b/index.js @@ -249,15 +249,25 @@ const renderImage = image => `\ const main = async () => { const feeds = [] + const subscribe = feedPromise => { + return feedPromise + .catch(error => { + console.error(error) + }) + .then(feed => { + feeds.push(feed) + }) + } + console.log('Grabbing posts...') for(let user of config.feeds.nitter) { - feeds.push(await handleNitterUser(user) ) + await subscribe(handleNitterUser(user) ) } console.log('Caching sources...') Bun.write('cache.json', JSON.stringify(cache, null, 2)) for(let user of config.feeds.tumblr) { - feeds.push(await handleTumblrUser(user) ) + await subscribe(handleTumblrUser(user) ) } await print(feeds) diff --git a/package.json b/package.json index cfb0a1d..77e6624 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rssssing", - "version": "1.0.2", + "version": "1.0.3", "description": "", "main": "index.js", "scripts": {