From 6b40902a8f70331fe6419cb3931112251875e8e7 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Fri, 5 Mar 2021 16:59:28 +0100 Subject: [PATCH] Handle requests without URI --- src/serviceproviders.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/serviceproviders.js b/src/serviceproviders.js index d38ecb9..d61f0e3 100644 --- a/src/serviceproviders.js +++ b/src/serviceproviders.js @@ -72,6 +72,10 @@ const match = (uri, opts) => { const directRequestHandler = (spData, opts) => { return new Promise(async (resolve, reject) => { const url = spData.proof.fetch ? spData.proof.fetch : spData.proof.uri + if (!url) { + reject('No valid URI provided') + return + } let res switch (spData.proof.format) {