atmosphere explorer pds.ls
tool typescript atproto
434
fork

Configure Feed

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

handle error during did document resolution

Juliet 7ea97601 52a9e1ba

+8 -2
+8 -2
src/utils/api.ts
··· 62 62 throw new Error("Not a valid DID identifier"); 63 63 } 64 64 65 - const doc = await didDocumentResolver().resolve(did); 66 - didDocCache[did] = doc; 65 + let doc: DidDocument; 66 + try { 67 + doc = await didDocumentResolver().resolve(did); 68 + didDocCache[did] = doc; 69 + } catch (e) { 70 + console.error(e); 71 + throw new Error("Error during did document resolution"); 72 + } 67 73 68 74 const pds = getPdsEndpoint(doc); 69 75 const labeler = getLabelerEndpoint(doc);