From 60603472624a4fc2b9f2c8b14449a7e08583a22a Mon Sep 17 00:00:00 2001 From: Ayo Ayco Date: Wed, 8 Jan 2025 15:18:14 +0100 Subject: [PATCH] feat: log if account has error --- src/pages/tech-bsky-fedi.astro | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/pages/tech-bsky-fedi.astro b/src/pages/tech-bsky-fedi.astro index 29b90da..6b6958d 100644 --- a/src/pages/tech-bsky-fedi.astro +++ b/src/pages/tech-bsky-fedi.astro @@ -35,11 +35,14 @@ const responses = await Promise.all(promises) let data = await Promise.all(responses.map((response) => response.json())) // filter accounts with error (e.g., AccountDisabled) -accountObjects = accountObjects.filter((acct, index) => !data[index].error) +accountObjects = accountObjects.filter((acct, index) => { + const hasNoError = !data[index].error + if (!hasNoError) + console.log(`>>> ${acct.bskyHandle} has error: ${data[index].error}`) + return hasNoError +}) data = data.filter((datum) => !datum.error) -console.log(accountObjects) - const title = 'Tech Bsky ↔ Fedi' const description = 'Celebrating bsky folks who bridged their accounts to the fediverse!'