mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
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;
|
fingerprint = sigVerification.publicKey.fingerprint;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
feedback += `<p>There was a problem reading the signature.</p>`;
|
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('#profileData').innerHTML = feedback;
|
||||||
document.body.querySelector('#profileName').innerHTML = "Could not load profile";
|
document.body.querySelector('#profileName').innerHTML = "Could not load profile";
|
||||||
return;
|
return;
|
||||||
|
|
Loading…
Reference in a new issue