Blogging platform with advanced tools for arts and sciences.
6

Configure Feed

Select the types of activity you want to include in your feed.

Enhance doc indexing so that - Pub exists on PDS but missing from DynamoDB : backfilled automatically, doc indexed - Pub genuinely doesn't exist (404) : skipped silently (debug log only) - PDS fetch fails (5xx, network error) : bubbles up as Handler error so we know about it

lemma (Jun 5, 2026, 4:26 PM -0500) e905f355 d13db9e8

+18 -7
+18 -7
infra/indexer/src/index.ts
··· 105 105 const res = await fetch( 106 106 `${pds}/xrpc/com.atproto.repo.getRecord?repo=${encodeURIComponent(pubDid)}&collection=site.standard.publication&rkey=${encodeURIComponent(pubRkey)}`, 107 107 ) 108 - if (!res.ok) throw new Error(`Publication not found: ${atUri}`) 108 + if (res.status === 404) throw new Error(`Publication not found: ${atUri}`) 109 + if (!res.ok) throw new Error(`Publication fetch failed (${res.status}): ${atUri}`) 109 110 const record = (await res.json()) as { 110 111 value: { url: string; name: string; description?: string; preferences?: { showInDiscover?: boolean } } 111 112 } ··· 377 378 const site = record.site 378 379 const siteIsAtUri = site.startsWith('at://') 379 380 380 - const [pubMeta, resolvedHandle] = await Promise.all([ 381 - siteIsAtUri 382 - ? resolvePublicationMeta(site) 383 - : Promise.resolve({ url: site.replace(/\/$/, ''), name: '' }), 384 - resolveAuthorHandle(did), 385 - ]) 381 + let pubMeta: { url: string; name: string } 382 + let resolvedHandle: string 383 + try { 384 + ;[pubMeta, resolvedHandle] = await Promise.all([ 385 + siteIsAtUri 386 + ? resolvePublicationMeta(site) 387 + : Promise.resolve({ url: site.replace(/\/$/, ''), name: '' }), 388 + resolveAuthorHandle(did), 389 + ]) 390 + } catch (err) { 391 + if (err instanceof Error && err.message.startsWith('Publication not found:')) { 392 + if (DEBUG) console.log(`skip doc ${did} ${rkey} (pub not found on PDS)`) 393 + return 394 + } 395 + throw err 396 + } 386 397 387 398 const item: Record<string, unknown> = { 388 399 PK: `u#${did}#post`,