1.0.3 - Improved error handling

This commit is contained in:
dakedres 2023-10-03 16:54:42 -04:00
parent 311519ebd9
commit 12c815fde3
2 changed files with 13 additions and 3 deletions

View File

@ -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)

View File

@ -1,6 +1,6 @@
{
"name": "rssssing",
"version": "1.0.2",
"version": "1.0.3",
"description": "",
"main": "index.js",
"scripts": {