atproto explorer pdsls.dev
atproto tool

show repos with a missing PDS

juli.ee ed34ac44 b550be27

verified
Changed files
+16 -8
src
views
+16 -8
src/views/repo.tsx
···
try {
pds = await resolvePDS(did);
} catch {
-
try {
-
const did = await resolveHandle(params.repo as Handle);
-
navigate(location.pathname.replace(params.repo, did));
-
} catch {
+
if (!did.startsWith("did:")) {
try {
-
const nsid = params.repo as Nsid;
-
const res = await resolveLexiconAuthority(nsid);
-
navigate(`/at://${res}/com.atproto.lexicon.schema/${nsid}`);
+
const did = await resolveHandle(params.repo as Handle);
+
navigate(location.pathname.replace(params.repo, did));
} catch {
-
navigate(`/${did}`);
+
try {
+
const nsid = params.repo as Nsid;
+
const res = await resolveLexiconAuthority(nsid);
+
navigate(`/at://${res}/com.atproto.lexicon.schema/${nsid}`);
+
} catch {
+
navigate(`/${did}`);
+
}
}
}
}
···
getRotationKeys();
validateHandles();
+
+
if (!pds) {
+
setError("Missing PDS");
+
navigate(`/at://${params.repo}#identity`);
+
return {};
+
}
rpc = new Client({ handler: new CredentialManager({ service: pds }) });
const res = await rpc.get("com.atproto.repo.describeRepo", {