feat: log if account has error

This commit is contained in:
Ayo Ayco 2025-01-08 15:18:14 +01:00
parent d6a5922450
commit 6060347262

View file

@ -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!'