lightweight com.atproto.sync.listReposByCollection
45
fork

Configure Feed

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

howwwwwwwww

phil ae34c49d abd8c92c

+22 -5
+4 -3
src/sync/resync/describe_repo.rs
··· 71 71 }; 72 72 let host = base 73 73 .host_str() 74 - .ok_or(GetCollectionsError::Request(format!( 75 - "failed to get host from {base:?}" 76 - )))? 74 + .ok_or_else(|| { 75 + tracing::error!("AHHAHHAHAHHAAAAAAAAAHHHHHHHHHHHHHHH"); 76 + GetCollectionsError::Request(format!("failed to get host from {base:?}")) 77 + })? 77 78 .to_string(); 78 79 79 80 let output = client
+6 -1
src/sync/resync/get_repo.rs
··· 29 29 C: HttpClient + HttpClientExt + Sync, 30 30 { 31 31 let req = GetRepo { did, since: None }; 32 - let host = base.host_str().unwrap_or("").to_string(); 32 + let Some(host) = base.host_str().map(|s| s.to_string()) else { 33 + tracing::error!("AAAAHHHHH"); 34 + return Err(GetCollectionsError::Wtf(format!( 35 + "HOW EVEN? base: {base:?}" 36 + ))); 37 + }; 33 38 34 39 let response = client 35 40 .xrpc(base.clone())
+12 -1
src/sync/resync/mod.rs
··· 30 30 http_client::{HttpClient, HttpClientExt}, 31 31 types::string::{Did, Nsid, Tid}, 32 32 }; 33 - use tracing::info; 33 + use tracing::{error, info}; 34 34 35 35 use crate::storage::DbRef; 36 36 use crate::storage::repo::{AccountStatus, RepoInfo, RepoPrev, RepoState}; ··· 62 62 RepoNotFound, 63 63 #[error("externally cancelled")] 64 64 Cancelled, 65 + #[error("wtf, {0}")] 66 + Wtf(String), 65 67 } 66 68 67 69 /// A snapshot of a repository's state as observed during a resync. ··· 102 104 /// The request was externally cancelled 103 105 #[error("externally cancelled")] 104 106 Cancelled, 107 + #[error("wtf!?, {0}")] 108 + Wtf(String), 105 109 } 106 110 107 111 /// The specific reason a repository is inaccessible. ··· 154 158 }; 155 159 let resolved = resolved?; 156 160 let base = &*resolved.pds; 161 + let Some(_) = base.host_str() else { 162 + error!(did = %did, host = %resolved.pds, "index_repo received a URL without a host???"); 163 + return Err(ResyncError::Wtf(format!( 164 + "URL without host?? {:?}", 165 + resolved.pds 166 + ))); 167 + }; 157 168 158 169 let repo_snapshot = match fetch_collections( 159 170 &client,