diff --git a/ingest.ts b/ingest.ts index ec67fdc..4f0cef4 100644 --- a/ingest.ts +++ b/ingest.ts @@ -122,7 +122,7 @@ for await (const event of jetstream) { try { pds = await getPDS(event.did as DID); } catch (e) { - console.error(e); + console.error(`Failed to get PDS for ${event.did}: ${e}`); continue; } @@ -153,7 +153,9 @@ for await (const event of jetstream) { async function backfillUser(did: ActorIdentifier) { const cached = getAuthor.get(did); - const pds = await getPDS(did as DID, true); + const pds = await getPDS(did as DID, true).catch((e) => { + console.error(`Failed to get PDS for ${did}: ${e}`); + }); if (!pds || cached?.pds === pds) return pds; const handler = simpleFetchHandler({ service: pds }); const rpc = new Client({ handler });