-
Notifications
You must be signed in to change notification settings - Fork 42
Open
Labels
Description
jsonld-signatures/lib/ProofSet.js
Lines 318 to 321 in 9a665c5
// first check if the proof matches the purpose; if it doesn't continue | |
if(!await purpose.match(proof, {document, documentLoader, expansionMap})) { | |
continue; | |
} |
if a purpose does not match no Error
or Reason
is given. Then if no purposes match at all then this generic error is thrown:
jsonld-signatures/lib/ProofSet.js
Lines 151 to 157 in 9a665c5
if(results.length === 0) { | |
const error = new Error( | |
'Did not verify any proofs; insufficient proofs matched the ' + | |
'acceptable suite(s) and required purpose(s).'); | |
error.name = 'NotFoundError'; | |
throw error; | |
} |
jsigs should allow purpose.match to supply a reason for not matching which is reported back to the user.