forked from Mirrors/keyoxide-web
Render error message when error is object
This commit is contained in:
parent
a2afafa088
commit
8973052ba7
1 changed files with 5 additions and 1 deletions
|
@ -245,7 +245,11 @@ async function displayProfile(opts) {
|
|||
fingerprint = sigVerification.publicKey.fingerprint;
|
||||
} catch (e) {
|
||||
feedback += `<p>There was a problem reading the signature.</p>`;
|
||||
feedback += `<code>${e}</code>`;
|
||||
if ('errors' in e) {
|
||||
feedback += `<code>${e.errors.join(', ')}</code>`;
|
||||
} else {
|
||||
feedback += `<code>${e}</code>`;
|
||||
}
|
||||
document.body.querySelector('#profileData').innerHTML = feedback;
|
||||
document.body.querySelector('#profileName').innerHTML = "Could not load profile";
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue