wrapping verifyProof in try

This will prevent other proofs from failing if there is an error in
one of them

See #44
This commit is contained in:
Yisrael Dov Lebow 🐻 2020-10-01 14:35:04 +03:00
parent 0491c3db38
commit e07cfd7f7b

View file

@ -435,6 +435,7 @@ async function verifyProof(url, fingerprint) {
// Init // Init
let reVerify, match, output = {url: url, type: null, proofUrl: url, proofUrlFetch: null, isVerified: false, display: null, qr: null}; let reVerify, match, output = {url: url, type: null, proofUrl: url, proofUrlFetch: null, isVerified: false, display: null, qr: null};
try {
// DNS // DNS
if (/^dns:/.test(url)) { if (/^dns:/.test(url)) {
output.type = "domain"; output.type = "domain";
@ -791,6 +792,9 @@ async function verifyProof(url, fingerprint) {
} catch (e) { } catch (e) {
console.warn(e); console.warn(e);
} }
} catch (e) {
console.warn(e);
}
// Return output without confirmed proof // Return output without confirmed proof
return output; return output;