From 6e828ca5881a89720ef23e649062e65478ea9c7d Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sat, 9 Jan 2021 15:21:30 +0100 Subject: [PATCH] Add parameter to catch blocks --- src/signatures.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/signatures.js b/src/signatures.js index 67ecc6d..2a53d5b 100644 --- a/src/signatures.js +++ b/src/signatures.js @@ -66,14 +66,14 @@ const verify = (signature, opts) => { try { keyUri = sigKeys[0] keyData = await keys.fetch.uri(keyUri) - } catch {} + } catch(e) {} } // Try WKD if (!keyData && signersUserId) { try { keyUri = `wkd:${signersUserId}` keyData = await keys.fetch.uri(keyUri) - } catch {} + } catch(e) {} } // Try HKP if (!keyData) { @@ -81,7 +81,7 @@ const verify = (signature, opts) => { const match = preferredKeyServer.match(/^(.*\:\/\/)?([^/]*)(?:\/)?$/i) keyUri = `hkp:${match[2]}:${issuerKeyId ? issuerKeyId : signersUserId}` keyData = await keys.fetch.uri(keyUri) - } catch { + } catch(e) { errors.push('key_not_found') reject({ errors: errors }) return