From d6d33e21d314fb3a247a5f3269778962326f03d0 Mon Sep 17 00:00:00 2001 From: Mia Date: Sat, 19 Jul 2025 10:54:27 +0100 Subject: [PATCH] fix(consumer): don't error out on backfill when handle validation fails --- consumer/src/backfill/mod.rs | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) diff --git a/consumer/src/backfill/mod.rs b/consumer/src/backfill/mod.rs index bff8d3e2..f65dfa3c 100644 --- a/consumer/src/backfill/mod.rs +++ b/consumer/src/backfill/mod.rs @@ -193,23 +193,21 @@ async fn backfill_actor( // in theory, we can use com.atproto.identity.resolveHandle against a PDS, but that seems // like a way to end up with really sus handles. - let Some(handle_did) = inner.resolver.resolve_handle(&handle).await? else { - eyre::bail!("Failed to resolve did for handle {handle}"); - }; - - if handle_did != did { - eyre::bail!("requested DID doesn't match handle"); + if let Some(handle_did) = inner.resolver.resolve_handle(&handle).await? { + if handle_did != did { + tracing::warn!("requested DID doesn't match handle"); + } else { + // set the handle from above + db::actor_upsert_handle( + conn, + did, + ActorSyncState::Processing, + Some(handle), + Utc::now(), + ) + .await?; + } } - - // set the handle from above - db::actor_upsert_handle( - conn, - did, - ActorSyncState::Processing, - Some(handle), - Utc::now(), - ) - .await?; } // now we can start actually backfilling -- 2.51.2