at protocol indexer with flexible filtering, xrpc queries, and a cursor-backed event stream, built on fjall
at-protocol atproto indexer rust fjall

[backfill] remove into_diagnostic on Diagnostic types to preserve downcast

ptr.pet c74104c4 68cc0286

verified
+8 -24
+1 -1
src/backfill/mod.rs
··· 357 357 // 2. fetch repo (car) 358 358 let start = Instant::now(); 359 359 let req = GetRepo::new().did(did.clone()).build(); 360 - let resp = http.xrpc(pds_url).send(&req).await.into_diagnostic()?; 360 + let resp = http.xrpc(pds_url).send(&req).await?; 361 361 362 362 let car_bytes = match resp.into_output() { 363 363 Ok(o) => o,
+1 -1
src/bin/mst_dump.rs
··· 63 63 .into_diagnostic()?; 64 64 65 65 let req = GetRepo::new().did(did.clone()).build(); 66 - let resp = http.xrpc(pds_url).send(&req).await.into_diagnostic()?; 66 + let resp = http.xrpc(pds_url).send(&req).await?; 67 67 let car_bytes = resp.into_output().map_err(|e| miette::miette!("{}", e))?; // explicit map_err 68 68 69 69 info!("Fetched {} bytes", car_bytes.body.len());
+6 -22
src/resolver.rs
··· 49 49 match identifier { 50 50 AtIdentifier::Did(did) => Ok(did.clone().into_static()), 51 51 AtIdentifier::Handle(handle) => { 52 - let did = self 53 - .inner 54 - .jacquard 55 - .resolve_handle(handle) 56 - .await 57 - .into_diagnostic()?; 52 + let did = self.inner.jacquard.resolve_handle(handle).await?; 58 53 Ok(did.into_static()) 59 54 } 60 55 } 61 56 } 62 57 63 58 pub async fn resolve_identity_info(&self, did: &Did<'_>) -> Result<(Url, Option<Handle<'_>>)> { 64 - let doc_resp = self 65 - .inner 66 - .jacquard 67 - .resolve_did_doc(did) 68 - .await 69 - .into_diagnostic()?; 70 - let doc = doc_resp.parse().into_diagnostic()?; 59 + let doc_resp = self.inner.jacquard.resolve_did_doc(did).await?; 60 + let doc = doc_resp.parse()?; 71 61 72 62 let pds = doc 73 63 .pds_endpoint() ··· 85 75 return Ok(entry.get().clone()); 86 76 } 87 77 88 - let doc_resp = self 89 - .inner 90 - .jacquard 91 - .resolve_did_doc(&did) 92 - .await 93 - .into_diagnostic()?; 94 - let doc = doc_resp.parse().into_diagnostic()?; 78 + let doc_resp = self.inner.jacquard.resolve_did_doc(&did).await?; 79 + let doc = doc_resp.parse()?; 95 80 96 81 let key = doc 97 - .atproto_public_key() 98 - .into_diagnostic()? 82 + .atproto_public_key()? 99 83 .ok_or_else(|| NoSigningKeyError(did.clone())) 100 84 .into_diagnostic()?; 101 85