Unfollow tool for Bluesky

handle error on fetch/parse of did

Changed files
+8 -2
src
+8 -2
src/App.tsx
···
did.startsWith("did:web") ?
`https://${did.split(":")[2]}/.well-known/did.json`
: "https://plc.directory/" + did,
-
);
+
).catch((error: unknown) => {
+
console.warn("Failed to resolve DID", { error, did });
+
});
+
if (!res) return "";
return res
.json()
···
}
}
})
-
.catch(() => "");
+
.catch((error: unknown) => {
+
console.warn("Failed to parse DID", { error, did });
+
return "";
+
});
};
const Login: Component = () => {