diff --git a/src/_data/albums.js b/src/_data/albums.js index 7645d5de..da6c8f42 100644 --- a/src/_data/albums.js +++ b/src/_data/albums.js @@ -6,7 +6,7 @@ module.exports = async function () { const res = EleventyFetch(url, { duration: '1h', type: 'json', - }) + }).catch() const albums = await res return albums.topalbums.album } diff --git a/src/_data/articles.js b/src/_data/articles.js index 102fbd6b..728b7ac1 100644 --- a/src/_data/articles.js +++ b/src/_data/articles.js @@ -8,7 +8,7 @@ module.exports = async function () { duration: '1h', type: 'json', fetchOptions: { headers }, - }) + }).catch() const feed = await res const articles = feed.feed.splice(0, 5) return articles diff --git a/src/_data/artists.js b/src/_data/artists.js index 2625d19b..b7c67367 100644 --- a/src/_data/artists.js +++ b/src/_data/artists.js @@ -6,7 +6,7 @@ module.exports = async function () { const res = EleventyFetch(url, { duration: '1h', type: 'json', - }) + }).catch() const artists = await res return artists.topartists.artist } diff --git a/src/_data/books.js b/src/_data/books.js index 4fd1aca9..2d5b0934 100644 --- a/src/_data/books.js +++ b/src/_data/books.js @@ -5,9 +5,11 @@ module.exports = async function () { const url = 'https://oku.club/rss/collection/POaRa' const asset = new AssetCache('books_data') if (asset.isCacheValid('1h')) return await asset.getCachedValue() - const res = await extract(url).catch((error) => { - console.log(error.message) - }) + const res = await extract(url) + .catch((error) => { + console.log(error.message) + }) + .catch() const data = res.entries await asset.save(data, 'json') return data diff --git a/src/_data/follow.js b/src/_data/follow.js index 72414877..06fabd6d 100644 --- a/src/_data/follow.js +++ b/src/_data/follow.js @@ -5,7 +5,7 @@ module.exports = async function () { feed.addSource('atom', 'Link', 'https://coryd.dev/links.xml') feed.addSource('rss', 'Letterboxd', 'https://letterboxd.com/cdme/rss') feed.addSource('rss', 'Oku', 'https://oku.club/rss/collection/NvEmF') - const entries = feed.getEntries() + const entries = feed.getEntries().catch() const res = await entries const activity = { posts: [] } res.forEach((entry) => diff --git a/src/_data/status.js b/src/_data/status.js index a35e23c1..4f62830f 100644 --- a/src/_data/status.js +++ b/src/_data/status.js @@ -5,7 +5,7 @@ module.exports = async function () { const res = EleventyFetch(url, { duration: '1h', type: 'json', - }) + }).catch() const status = await res return status.response.statuses[0] } diff --git a/src/_data/webmentions.js b/src/_data/webmentions.js index 5ca4f561..274296f7 100644 --- a/src/_data/webmentions.js +++ b/src/_data/webmentions.js @@ -6,7 +6,7 @@ module.exports = async function () { const res = EleventyFetch(url, { duration: '1h', type: 'json', - }) + }).catch() const webmentions = await res return { mentions: webmentions.children,