APP-2977: Handle AppView polling errors (#11590)

This commit is contained in:
Samuel Newman
2026-09-03 01:00:56 +03:00
committed by GitHub
parent af3fbcc940
commit 58ca227922
16 changed files with 108 additions and 38 deletions
+5 -2
View File
@@ -43,7 +43,7 @@ export async function bulkWriteFollows(
writes: chunk,
})
}
await whenFollowsIndexed(appviewClient, did, res => !!res.follows.length)
await whenFollowsIndexed(appviewClient, did, res => !!res?.follows.length)
const followUris = new Map<string, string>()
for (const r of followWrites) {
@@ -58,7 +58,10 @@ export async function bulkWriteFollows(
async function whenFollowsIndexed(
appviewClient: Client,
actor: string,
fn: (res: app.bsky.graph.getFollows.$OutputBody) => boolean,
fn: (
res: app.bsky.graph.getFollows.$OutputBody | undefined,
err: unknown,
) => boolean,
) {
await until(
5, // 5 tries