mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Handle problems fetching keys
This commit is contained in:
parent
a504e8fd9d
commit
2252271995
1 changed files with 10 additions and 2 deletions
|
@ -181,9 +181,17 @@ async function verifyProofs(opts) {
|
|||
}
|
||||
|
||||
async function displayProfile(opts) {
|
||||
let keyData = await fetchKeys(opts);
|
||||
let keyData, feedback = "", notation, isVerified, verifications = [];
|
||||
try {
|
||||
keyData = await fetchKeys(opts);
|
||||
} catch (e) {
|
||||
feedback += `<p>There was a problem fetching the keys.</p>`;
|
||||
feedback += `<code>${e}</code>`;
|
||||
document.body.querySelector('#profileData').innerHTML = feedback;
|
||||
document.body.querySelector('#profileName').innerHTML = "Could not load profile";
|
||||
return;
|
||||
}
|
||||
let userData = keyData.user.user.userId;
|
||||
let feedback = "", notation, isVerified, verifications = [];
|
||||
|
||||
document.body.querySelector('#profileName').innerHTML = userData.name;
|
||||
document.title = `${userData.name} - Keyoxide`;
|
||||
|
|
Loading…
Reference in a new issue